diff --git a/src/views/modules/workSys/articleTag/edit.vue b/src/views/modules/workSys/articleTag/edit.vue
index 7ef2b7397..25f49d911 100644
--- a/src/views/modules/workSys/articleTag/edit.vue
+++ b/src/views/modules/workSys/articleTag/edit.vue
@@ -24,7 +24,6 @@
>
-
@@ -54,7 +53,6 @@
取 消
import { Loading } from "element-ui"; // 引入Loading服务
import { requestPost, requestGet } from "@/js/dai/request";
-
+import nextTick from "dai-js/tools/nextTick";
let loading; // 加载动画
export default {
data() {
@@ -76,11 +74,12 @@ export default {
formType: "add", //表单操作类型 add新增,edit编辑,detail详情
btnDisable: false,
orgOptions: [],
- agencyIdArray: [],
tagId: "",
+ sarr: [],
+ targetObj: {},
formData: {
tagName: "",
- agencyId: "",
+ agencyId: [],
orgIdPath: "",
},
formDatam: [],
@@ -105,22 +104,17 @@ export default {
this.startLoading();
this.formType = type;
if (type != "add") {
+ console.log(this.formData);
this.formData.tagName = row.tagName;
this.tagId = row.id;
- if (row.agencyList.length > 1) {
- this.formData.agencyId = row.agencyList[0].pid;
- if (row.agencyList[0].orgIdPath.split(":").length == 2) {
- this.formData.orgIdPath = row.agencyList[0].orgIdPath.split(":")[0];
- } else {
- this.formData.orgIdPath =
- row.agencyList[0].orgIdPath.split(":")[0] +
- ":" +
- row.agencyList[0].orgIdPath.split(":")[1];
+ this.formData.agencyId = [];
+
+ if (row.agencyList.length >= 1) {
+ for (let i in row.agencyList) {
+ this.formData.agencyId.push(row.agencyList[i].agencyId);
}
- } else if(row.agencyList.length == 0){
+ } else {
this.endLoading();
- this.formData.agencyId = row.agencyList[0].agencyId;
- this.formData.orgIdPath = row.agencyList[0].orgIdPath;
}
} else {
}
@@ -137,64 +131,26 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.options = [];
- this.agencyIdArray.length = [];
this.orgOptions.push(data);
} else {
this.$message.error(msg);
}
this.dataListLoading = false;
},
- deepTree(arr) {
- if (Array.isArray(arr)) {
- return arr.map((item) => {
- return {
- ...item,
- subAgencyList:
- (item.subAgencyList.length > 0 &&
- this.deepTree(item.subAgencyList)) ||
- null,
- };
- });
- }
- },
- cascaderClick() {
- let obj = this.$refs["cascaderUnit"].getCheckedNodes()[0].data;
- this.formDatam = [];
- if (obj) {
- if (obj.level === "street") {
- for (let i in obj.subAgencyList) {
- this.formDatam.push({
- agencyId: obj.subAgencyList[i].agencyId,
- orgIdPath: obj.subAgencyList[i].orgIdPath,
- pid: obj.subAgencyList[i].pid,
- agencyName: obj.subAgencyList[i].agencyName,
- });
- }
- console.log(this.formDatam);
- } else if (obj.level === "district") {
- for (let i in obj.subAgencyList) {
- if (obj.subAgencyList[i].subAgencyList != null) {
- for (let j in obj.subAgencyList[i].subAgencyList) {
- this.formDatam.push({
- agencyId:obj.subAgencyList[i].subAgencyList[j].agencyId,
- orgIdPath:obj.subAgencyList[i].subAgencyList[j].orgIdPath,
- pid: obj.subAgencyList[i].pid,
- agencyName: obj.subAgencyList[i].subAgencyList[j].agencyName,
- });
- }
- }
+
+
+ getLastItem(list, vals, key) {
+ let LIST = list || [];
+ for (let item of LIST) {
+ // console.log(item[key]);
+ for (let i of vals) {
+ if (item[key] === i) {
+ this.sarr.push(item);
+ break;
+ } else {
+ this.getLastItem(item.subAgencyList, vals, key);
}
- console.log(this.formDatam);
- } else if (obj.level === "community") {
- this.formDatam.push({
- agencyId: obj.agencyId,
- orgIdPath: obj.orgIdPath,
- agencyName: obj.agencyName,
- pid: obj.pid
- });
}
- } else {
- this.formDatam = [];
}
},
handleComfirm() {
@@ -208,6 +164,21 @@ export default {
},
async addNat() {
+ this.newArr = [];
+ this.formDatam = [];
+ const map = new Map();
+ this.getLastItem(this.orgOptions, this.formData.agencyId, "agencyId");
+ this.newArr = this.sarr.filter(
+ (v) => !map.has(v.agencyId) && map.set(v.agencyId, 1)
+ );
+ for (let i in this.newArr) {
+ this.formDatam.push({
+ agencyId: this.newArr[i].agencyId,
+ orgIdPath: this.newArr[i].orgIdPath,
+ pid: this.newArr[i].pid,
+ agencyName: this.newArr[i].agencyName,
+ });
+ }
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
diff --git a/src/views/modules/workSys/emblemManagement/cpts/emblemIfon.vue b/src/views/modules/workSys/emblemManagement/cpts/emblemIfon.vue
index d91ff2acc..2de6aea07 100644
--- a/src/views/modules/workSys/emblemManagement/cpts/emblemIfon.vue
+++ b/src/views/modules/workSys/emblemManagement/cpts/emblemIfon.vue
@@ -60,6 +60,11 @@
+
+
+ 备注: {{emblemObj.remark||'--'}}
+
+
取消
审核不通过
diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue
index 7bf0ed5e4..fe0f6235e 100644
--- a/src/views/pages/login.vue
+++ b/src/views/pages/login.vue
@@ -240,7 +240,7 @@ export default {
localStorage.setItem("userType", "work");
localStorage.setItem("showHeader", "0");
localStorage.setItem("token", res.data.token);
- this.$router.replace({ name: "index" });
+ this.skipAfterLogin();
})
.catch(() => { });
// epmet-ext9.elinkservice.cn/platform-admin
@@ -270,7 +270,7 @@ export default {
localStorage.setItem("userType", "work");
localStorage.setItem("token", res.data.token);
- this.$router.replace({ name: "index" });
+ this.skipAfterLogin();
})
.catch(() => {
this.endLoading();