diff --git a/src/views/ea/electronicAssets/index.vue b/src/views/ea/electronicAssets/index.vue
index fc3ac964..f8d1cd97 100644
--- a/src/views/ea/electronicAssets/index.vue
+++ b/src/views/ea/electronicAssets/index.vue
@@ -17,15 +17,6 @@
@keyup.enter.native="handleQuery"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
搜索
-
-
@@ -231,11 +160,28 @@
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+ placeholder="请选择业务实体"
+ value-key="id"
+ @change="handleCompanyChange"
+ >
+
+
+
-
@@ -419,17 +369,16 @@
-
-
-
-
-
-
+
@@ -439,17 +388,6 @@
-
-
-
-
-
-
@@ -475,6 +413,8 @@ import {
exportElectronicAssetsExcel,
} from "@/api/ea/electronicAssets/assetFile";
import Editor from "@/components/Editor";
+import { getOrganizationPage } from "@/api/setting/organization";
+import { getSiteTree } from "@/api/setting/organization";
export default {
name: "ElectronicAssets",
@@ -483,6 +423,11 @@ export default {
},
data() {
return {
+ propName: {
+ label: "pName",
+ value: "pId",
+ multiple: false,
+ },
// 遮罩层
loading: true,
// 导出遮罩层
@@ -530,10 +475,15 @@ export default {
form: {},
// 表单校验
rules: {},
+ organizationList: [],
+ siteOptions: [], //归档位置数据
+ siteArray: [], //归档位置选中值
};
},
created() {
this.getList();
+ this.getSiteList();
+ this.getOrganizationList();
},
methods: {
/** 查询列表 */
@@ -546,6 +496,40 @@ export default {
this.loading = false;
});
},
+ //获取归档位置
+ getSiteList() {
+ getSiteTree().then((response) => {
+ this.siteOptions = response.data;
+ this.siteOptions.map((w) => {
+ w.children.map((l) => {
+ let lstr = JSON.stringify(l.children)
+ .replace(/depotId/g, "lId")
+ .replace(/cabinetId/g, "pId")
+ .replace(/cabinetName/g, "pName");
+ l.children = JSON.parse(lstr);
+ });
+
+ let wstr = JSON.stringify(w.children)
+ .replace(/organizationId/g, "wId")
+ .replace(/depotId/g, "pId")
+ .replace(/depotName/g, "pName");
+ w.children = JSON.parse(wstr);
+ });
+ let ostr = JSON.stringify(this.siteOptions)
+ .replace(/organizationId/g, "pId")
+ .replace(/organizationName/g, "pName");
+ this.siteOptions = JSON.parse(ostr);
+ // console.log(this.siteOptions);
+ });
+ },
+ //选择默认的归档位置
+ handleSiteChanged(obj) {
+ if (obj != null) {
+ this.form.organizationId = obj[0];
+ this.form.depotId = obj[1];
+ this.form.cabinetId = obj[2];
+ }
+ },
/** 取消按钮 */
cancel() {
this.open = false;
@@ -578,6 +562,9 @@ export default {
recordId: undefined,
fileStatus: undefined,
createBy: undefined,
+ organizationId: undefined,
+ depotId: undefined,
+ cabinetId: undefined,
};
this.resetForm("form");
},
@@ -607,6 +594,17 @@ export default {
this.title = "修改资产档案";
});
},
+ // 获取业务实体
+ getOrganizationList() {
+ getOrganizationPage().then((response) => {
+ this.organizationList = response.data.list;
+ });
+ },
+ // 业务实体选择事件
+ handleCompanyChange(val) {
+ this.form.companyId = val.id;
+ this.form.company = val.organizationName;
+ },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {