diff --git a/src/views/ea/electronicContracts/index.vue b/src/views/ea/electronicContracts/index.vue index 265ec34d..9e8d7cdb 100644 --- a/src/views/ea/electronicContracts/index.vue +++ b/src/views/ea/electronicContracts/index.vue @@ -372,7 +372,20 @@ - + + + + @@ -522,36 +535,17 @@ - - - - - - - - - + - - - - - @@ -564,20 +558,6 @@ - - - - - - - @@ -603,6 +583,8 @@ import { import FileUpload from "@/components/FileUpload"; import ImagePreview from "@/components/ImagePreview"; import WxVideoPlayer from "@/views/mp/components/wx-video-play/main"; +import { getSiteTree } from "@/api/setting/organization"; +import { getOrganizationPage } from "@/api/setting/organization"; export default { name: "ElectronicContracts", @@ -613,6 +595,11 @@ export default { }, data() { return { + propName: { + label: "pName", + value: "pId", + multiple: false, + }, getFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/", imgs: null, // 遮罩层 @@ -671,10 +658,15 @@ export default { form: {}, // 表单校验 rules: {}, + siteOptions: [], //归档位置数据 + siteArray: [], //归档位置选中值 + organizationList: [], }; }, created() { this.getList(); + this.getSiteList(); + this.getOrganizationList(); }, methods: { /** 查询列表 */ @@ -688,6 +680,51 @@ export default { console.log(this.list); }); }, + //获取归档位置 + 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]; + } + }, + // 获取业务实体 + getOrganizationList() { + getOrganizationPage().then((response) => { + this.organizationList = response.data.list; + }); + }, + // 业务实体选择事件 + handleCompanyChange(val) { + this.form.companyId = val.id; + this.form.company = val.organizationName; + }, /** * 文件预览 * @param fileUrl diff --git a/src/views/ea/electronicEmployee/index.vue b/src/views/ea/electronicEmployee/index.vue index fdd614b5..3377aa9c 100644 --- a/src/views/ea/electronicEmployee/index.vue +++ b/src/views/ea/electronicEmployee/index.vue @@ -184,17 +184,6 @@ - - - - @@ -239,12 +228,32 @@ /> + + + +