diff --git a/src/api/job.js b/src/api/job.js
index ec07681..a1acca4 100644
--- a/src/api/job.js
+++ b/src/api/job.js
@@ -50,7 +50,7 @@ export function modifyJobDetail(data) {
export function queryDepartmentJob() {
return request({
- url: '/ahp/department-job-copy/query',
+ url: '/ahp/department-job/query',
method: 'get'
})
}
diff --git a/src/api/table.js b/src/api/table.js
deleted file mode 100644
index 2752f52..0000000
--- a/src/api/table.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import request from '@/utils/request'
-
-export function getList(params) {
- return request({
- url: '/vue-admin-template/table/list',
- method: 'get',
- params
- })
-}
diff --git a/src/utils/request.js b/src/utils/request.js
index c0103c1..4ddcc72 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -84,17 +84,16 @@ service.interceptors.response.use(
response => {
const res = response.data
// 状态码
- return res
- // if (res.code !== 0) {
- // Message({
- // message: `${res.code}: ${res.msg}` || 'Error check your token or method',
- // type: 'error',
- // duration: 2 * 1000
- // })
- // return Promise.reject(new Error(res.msg || 'Error'))
- // } else {
- // return res
- // }
+ if (res.code !== 0) {
+ Message({
+ message: `${res.code}: ${res.msg}` || 'Error check your token or method',
+ type: 'error',
+ duration: 2 * 1000
+ })
+ return Promise.reject(new Error(res.msg || 'Error'))
+ } else {
+ return res
+ }
},
error => {
Message({
diff --git a/src/views/job/show copy.vue b/src/views/job/show copy.vue
new file mode 100644
index 0000000..15b4b50
--- /dev/null
+++ b/src/views/job/show copy.vue
@@ -0,0 +1,891 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/job/show.vue b/src/views/job/show.vue
index 15b4b50..15accbb 100644
--- a/src/views/job/show.vue
+++ b/src/views/job/show.vue
@@ -555,18 +555,19 @@ export default {
}
},
async clickModify() {
- await this.verifyWritePriority();
- if (this.writePriority) {
- this.allowSave = true;
- this.jm.enable_edit();
- } else {
- // 没有权限
- this.$message({
- message: "没有修改权限",
- type: "error",
- duration: 2000,
- });
- }
+ // await this.verifyWritePriority();
+ // if (this.writePriority) {
+ // this.allowSave = true;
+ // this.jm.enable_edit();
+ // } else {
+ // // 没有权限
+ // this.$message({
+ // message: "没有修改权限",
+ // type: "error",
+ // duration: 2000,
+ // });
+ // }
+
// 判断是否有修改权限
// verifyJobPriority({
// id_card: this.$store.state.user.id_card,
@@ -632,23 +633,23 @@ export default {
return resData;
},
clickSaveTree() {
- let resData = this.cleanTreeData();
- // 发送请求
- jobApi.modifyFramework({ data: resData }).then(
- (res) => {
- if (res.code === 0) {
- Message({
- message: "保存成功",
- type: "success",
- duration: 1 * 1000,
- });
- }
- console.log(resData);
- },
- (err) => {
- console.log("err: ", err);
- }
- );
+ // let resData = this.cleanTreeData();
+ // // 发送请求
+ // jobApi.modifyFramework({ data: resData }).then(
+ // (res) => {
+ // if (res.code === 0) {
+ // Message({
+ // message: "保存成功",
+ // type: "success",
+ // duration: 1 * 1000,
+ // });
+ // }
+ // console.log(resData);
+ // },
+ // (err) => {
+ // console.log("err: ", err);
+ // }
+ // );
},
clickHello() {
// 发起请求
@@ -695,149 +696,149 @@ export default {
return "合法名称";
},
async clickSaveDoc() {
- // 判断权限
- await this.verifyWritePriority();
+ // // 判断权限
+ // await this.verifyWritePriority();
- if (!this.writePriority) {
- // 没有权限
- this.$message({
- message: "没有修改权限",
- type: "error",
- duration: 2000,
- });
- return;
- }
+ // if (!this.writePriority) {
+ // // 没有权限
+ // this.$message({
+ // message: "没有修改权限",
+ // type: "error",
+ // duration: 2000,
+ // });
+ // return;
+ // }
- // 增加节点,判断是否可添加
- if (this.curNewNode) {
- if (this.comName == "DepDescription") {
- this.curDep = this.depData.部门名称;
- } else {
- this.curJob = this.jobData.岗位概况.岗位名称;
- }
- let nodeName =
- this.comName == "DepDescription" ? this.curDep : this.curJob;
- let msg = this.checkNewNodeValid(nodeName);
- if (msg == "合法名称") {
- // 保存修改到架构图
- this.jm.update_node(this.curNewNode.id, nodeName);
- // 发送保存架构图请求
- let resData = this.cleanTreeData();
- // 发送请求
- jobApi.modifyFramework({ data: resData }).then(
- (res) => {
- if (res.code == 0) {
- }
- },
- (err) => {
- console.log("err: ", err);
- }
- );
- // 还原curNewNode状态
- this.curNewNode = null;
- } else {
- Message({
- message: msg,
- type: "error",
- duration: 1 * 1000,
- });
- return;
- }
- }
+ // // 增加节点,判断是否可添加
+ // if (this.curNewNode) {
+ // if (this.comName == "DepDescription") {
+ // this.curDep = this.depData.部门名称;
+ // } else {
+ // this.curJob = this.jobData.岗位概况.岗位名称;
+ // }
+ // let nodeName =
+ // this.comName == "DepDescription" ? this.curDep : this.curJob;
+ // let msg = this.checkNewNodeValid(nodeName);
+ // if (msg == "合法名称") {
+ // // 保存修改到架构图
+ // this.jm.update_node(this.curNewNode.id, nodeName);
+ // // 发送保存架构图请求
+ // let resData = this.cleanTreeData();
+ // // 发送请求
+ // jobApi.modifyFramework({ data: resData }).then(
+ // (res) => {
+ // if (res.code == 0) {
+ // }
+ // },
+ // (err) => {
+ // console.log("err: ", err);
+ // }
+ // );
+ // // 还原curNewNode状态
+ // this.curNewNode = null;
+ // } else {
+ // Message({
+ // message: msg,
+ // type: "error",
+ // duration: 1 * 1000,
+ // });
+ // return;
+ // }
+ // }
- // 修改节点
- if (this.comName === "DepDescription") {
- // 整理数据
- // 去除两端空字符
- for (let i of Object.keys(this.depData)) {
- if (i == "是否为虚拟部门") {
- continue;
- }
- this.depData[i] = this.depData[i].trim();
- }
- // 部门保存
- jobApi
- .modifyDepartmentDetail({
- data: this.depData,
- department: this.curDep,
- })
- .then(
- (res) => {
- if (res.code === 0) {
- Message({
- message: "保存成功",
- type: "success",
- duration: 1 * 1000,
- });
- }
- },
- (err) => {
- console.log("err:", err);
- }
- );
- } else if (this.comName === "JobDescription") {
- // 整理数据
- let tinyData = function (data) {
- for (let name in data) {
- if (typeof data[name] == "string") {
- data[name] = data[name].trim();
- } else if (data[name] instanceof Array) {
- // 去除 "双击添加"
- let arr = data[name];
- while (arr[arr.length - 1] == "双击添加") {
- arr.pop();
- }
- // 去除 空字符串""
- // for (let i = 0; i < arr.length; i++) {
- // if (arr[i].trim() == "") {
- // arr.splice(i, 1);
- // i -= 1;
- // }
- // }
+ // // 修改节点
+ // if (this.comName === "DepDescription") {
+ // // 整理数据
+ // // 去除两端空字符
+ // for (let i of Object.keys(this.depData)) {
+ // if (i == "是否为虚拟部门") {
+ // continue;
+ // }
+ // this.depData[i] = this.depData[i].trim();
+ // }
+ // // 部门保存
+ // jobApi
+ // .modifyDepartmentDetail({
+ // data: this.depData,
+ // department: this.curDep,
+ // })
+ // .then(
+ // (res) => {
+ // if (res.code === 0) {
+ // Message({
+ // message: "保存成功",
+ // type: "success",
+ // duration: 1 * 1000,
+ // });
+ // }
+ // },
+ // (err) => {
+ // console.log("err:", err);
+ // }
+ // );
+ // } else if (this.comName === "JobDescription") {
+ // // 整理数据
+ // let tinyData = function (data) {
+ // for (let name in data) {
+ // if (typeof data[name] == "string") {
+ // data[name] = data[name].trim();
+ // } else if (data[name] instanceof Array) {
+ // // 去除 "双击添加"
+ // let arr = data[name];
+ // while (arr[arr.length - 1] == "双击添加") {
+ // arr.pop();
+ // }
+ // // 去除 空字符串""
+ // // for (let i = 0; i < arr.length; i++) {
+ // // if (arr[i].trim() == "") {
+ // // arr.splice(i, 1);
+ // // i -= 1;
+ // // }
+ // // }
- // 去除空数组
- let deleteArr = [
- "党风廉政建设",
- "工作职责",
- "部门管理",
- "业务管理",
- "属员管理",
- "安全职责",
- "临时代理工作",
- ];
- if (!arr.length && deleteArr.includes(name)) {
- delete data[name];
- }
- } else if (data[name] instanceof Object) {
- tinyData(data[name]);
- } else {
- // console.log(data[name]);
- }
- }
- };
- tinyData(this.jobData);
- // 岗位保存
- jobApi
- .modifyJobDetail({
- data: this.jobData,
- department: this.curDep,
- job: this.curJob,
- })
- .then(
- (res) => {
- if (res.code) {
- Message({
- message: "保存成功",
- type: "success",
- duration: 1 * 1000,
- });
- }
- },
- (err) => {
- console.log("err:", err);
- }
- );
- }
+ // // 去除空数组
+ // let deleteArr = [
+ // "党风廉政建设",
+ // "工作职责",
+ // "部门管理",
+ // "业务管理",
+ // "属员管理",
+ // "安全职责",
+ // "临时代理工作",
+ // ];
+ // if (!arr.length && deleteArr.includes(name)) {
+ // delete data[name];
+ // }
+ // } else if (data[name] instanceof Object) {
+ // tinyData(data[name]);
+ // } else {
+ // // console.log(data[name]);
+ // }
+ // }
+ // };
+ // tinyData(this.jobData);
+ // // 岗位保存
+ // jobApi
+ // .modifyJobDetail({
+ // data: this.jobData,
+ // department: this.curDep,
+ // job: this.curJob,
+ // })
+ // .then(
+ // (res) => {
+ // if (res.code) {
+ // Message({
+ // message: "保存成功",
+ // type: "success",
+ // duration: 1 * 1000,
+ // });
+ // }
+ // },
+ // (err) => {
+ // console.log("err:", err);
+ // }
+ // );
+ // }
},
},
components: {
diff --git a/src/views/person/components/PersonPicture.vue b/src/views/person/components/PersonPicture.vue
index 5c61ad0..f476304 100644
--- a/src/views/person/components/PersonPicture.vue
+++ b/src/views/person/components/PersonPicture.vue
@@ -133,6 +133,7 @@
{{ value }}
+
暂无数据。
@@ -149,6 +150,7 @@
{{ value }}
+ 暂无数据。
@@ -162,6 +164,7 @@
{{ value }}
+ 暂无数据。