编辑
@@ -35,6 +40,14 @@ export default {
props: {
value: Object,
},
+ watch: {
+ value: {
+ handler(val) {
+ console.log(val);
+ },
+ deep: true,
+ },
+ },
data() {
return {};
},
diff --git a/src/pages/system/view/organization/usermanagement/form.vue b/src/pages/system/view/organization/usermanagement/form.vue
index 39bed447315b571edd2dd1288f7bf5836c755ab6..67fb482dc1506c964e8f4e135af26e83931a486a 100644
--- a/src/pages/system/view/organization/usermanagement/form.vue
+++ b/src/pages/system/view/organization/usermanagement/form.vue
@@ -74,6 +74,7 @@ export default {
this.current--;
},
async onSubmit() {
+ console.log(this.form);
if (this.form.userJobRelationList.length === 0) {
this.$message.error('必须设置岗位!');
return;
@@ -81,9 +82,10 @@ export default {
const userCertificateList = this.form.userCertificateList.map((i) => {
return {
...i,
- pictureUrl: i.pictureUrl[0]?.url || undefined,
+ pictureUrl: i.pictureUrl && (i.pictureUrl[0]?.url || undefined),
};
});
+ console.log(userCertificateList);
const userRoleRelationList = this.form.userRoleRelationList.map((i) => ({ roleId: i }));
const data = { ...this.form, userRoleRelationList, userCertificateList };
if (this.form.userId) {
diff --git a/src/router/config.js b/src/router/config.js
index 81f30ccfd7d043c6c78b55d1a155b3ff851afbb7..a13aeeb477ba57df085c9d303620082473f0966e 100644
--- a/src/router/config.js
+++ b/src/router/config.js
@@ -136,6 +136,26 @@ const hasAuthorityRoutes = [
},
],
},
+ {
+ path: 'oceanus',
+ name: '设备管理',
+ meta: {
+ icon: 'control',
+ },
+ component: PageTemplateView,
+ children: [
+ {
+ path: 'category',
+ name: '分类配置',
+ component: () => import('@/pages/oceanus/category/index.vue'),
+ },
+ {
+ path: 'equipment',
+ name: '设备台账',
+ component: () => import('@/pages/oceanus/equipment/index.vue'),
+ },
+ ],
+ },
{
path: 'user',
name: '个人中心',
diff --git a/src/utils/index.js b/src/utils/index.js
index 3b1ef28a5334815b52eb4ed5462c81aedb2400d8..47c69e02fd63aa5ad6c225c515bef107b1b6e0da 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -89,7 +89,6 @@ export function arrayToTree(options) {
const THISDATA = JSON.parse(JSON.stringify(this.data));
for (let i = 0; i < this.data.length; i++) {
let currentElement = this.data[i];
- currentElement.selectable = currentElement.orgType === 'DEPARTMENT';
let tempCurrentElementParent = this.indexStorage[currentElement[this.parentKey]]; // 临时变量里面的当前元素的父元素
if (tempCurrentElementParent) {
// 如果存在父元素
diff --git a/src/utils/requestUtil.js b/src/utils/requestUtil.js
index f961ef030c264b09ec4b47194005f55683a54aba..fca6e639fef2d4512b5aafdae9dd4957c0f27d66 100644
--- a/src/utils/requestUtil.js
+++ b/src/utils/requestUtil.js
@@ -11,6 +11,8 @@ axios.defaults.withCredentials = true;
axios.defaults.xsrfHeaderName = xsrfHeaderName;
axios.defaults.xsrfCookieName = xsrfHeaderName;
+axios.defaults.baseURL = '/api';
+
/**
* @param {*} info 提示函数
*/
diff --git a/vue.config.js b/vue.config.js
index 663d87db35e4d75ed7637aa5abbd7e6b2fd0d64e..7b2497a088cf50554b1a445484fd90442a4a3124 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -193,14 +193,14 @@ const assetsCDN = {
module.exports = {
devServer: {
proxy: {
- '/api': {
+ '/api/': {
//此处要与 /services/api.js 中的 API_PROXY_PREFIX 值保持一致
// target: process.env.VUE_APP_API_BASE_URL,
target: 'http://platform.kuopu.net:9300',
changeOrigin: true,
- // pathRewrite: {
- // '^/api': ''
- // }
+ pathRewrite: {
+ '^/api/': '',
+ },
},
},
},