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 @@
-
-
-
- {{ parseTime(scope.row.createTime) }}
-
-
@@ -239,12 +228,32 @@
/>
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+ 查看
+
-->
-
+
+
+
+
+
@@ -386,42 +409,43 @@
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
@@ -436,17 +460,15 @@
/>
-
-
-
-
-
+
+
+
@@ -505,81 +527,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
@@ -686,6 +660,8 @@ import {
exportElectronicEmployeeExcel,
} from "@/api/ea/electronicEmployee/electronicEmployee";
import Editor from "@/components/Editor";
+import { getOrganizationPage } from "@/api/setting/organization";
+import { getSiteTree } from "@/api/setting/organization";
export default {
name: "ElectronicEmployee",
@@ -694,8 +670,14 @@ export default {
},
data() {
return {
+ propName: {
+ label: "pName",
+ value: "pId",
+ multiple: false,
+ },
// 遮罩层
loading: true,
+ optType: undefined,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
@@ -722,9 +704,7 @@ export default {
contactNumber: null,
idCardNumber: null,
year: null,
- // year: [],
period: null,
- // period: [],
borrowStatus: null,
recordTime: [],
position: null,
@@ -739,10 +719,15 @@ export default {
form: {},
// 表单校验
rules: {},
+ organizationList: [],
+ siteOptions: [], //归档位置数据
+ siteArray: [], //归档位置选中值
};
},
created() {
this.getList();
+ this.getOrganizationList();
+ this.getSiteList();
},
methods: {
/** 查询列表 */
@@ -755,6 +740,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;
@@ -822,11 +841,25 @@ export default {
handleAdd() {
this.reset();
this.open = true;
+ this.optType = "add";
this.title = "添加员工档案";
},
+ /** 查看按钮操作 */
+ handleView(row) {
+ this.reset();
+ this.optType = "view";
+ const id = row.id;
+ getElectronicEmployee(id).then((response) => {
+ this.form = response.data;
+ this.dateArray(this.form.birthdate);
+ this.open = true;
+ this.title = "查看员工档案";
+ });
+ },
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
+ this.optType = "edit";
const id = row.id;
getElectronicEmployee(id).then((response) => {
this.form = response.data;
@@ -835,6 +868,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) => {