审核
@@ -123,19 +143,6 @@
-
- 请核对招聘信息后再进行审核通过
-
-
@@ -148,10 +155,11 @@ import {
import { mapGetters } from "vuex";
import postView from "@/views/util/post-view.vue";
import zpView from "./zpView.vue";
-import { recruitStatus, wageUnitCategoryState} from "@/common/dic";
+import {dataSourcesEnum, recruitStatus, wageUnitCategoryState} from "@/common/dic";
import { calcDate } from "@/util/date";
import { Message } from "element-ui";
import lodash from "lodash";
+import {Auditing} from "@/api/manage/mission";
const message = lodash.throttle(
function (options) {
@@ -167,6 +175,7 @@ export default {
data() {
return {
recruitStatus,
+ dataSourcesEnum,
view: {},
form: {},
selectionList: [],
@@ -304,8 +313,6 @@ export default {
],
},
data: [],
- centerDialogVisible: false,
- AuditingData: null,
};
},
computed: {
@@ -420,26 +427,80 @@ export default {
handleDelay(row) {
this.$refs.delay.open(row.missionNo);
},
- async handelAuditing(type) {
- const {id, jobType} = this.AuditingData
- let resData = await review({id, reviewState: type, jobType})
- this.AuditingData = null
- this.centerDialogVisible = false
- if(resData.data.code === 200) {
- this.$message({
- type: "success",
- message: "审核成功!",
+ handleCheck() {
+ let self = this
+ if (this.ids.length < 1) {
+ message({
+ type: "warning",
+ message: "请至少选择一条数据",
});
+ return;
+ }
+ let idList = [];
+ for (let i = 0; i < this.ids.length; i++) {
+ this.data.forEach((ele) => {
+ if (ele.id == this.ids[i]) {
+ idList.push(ele.id);
+ }
+ });
+ }
+
+ if (idList.length == 0) {
+ this.$message.error("只能驳回【招聘中】的任务");
} else {
- message({
+ let h = this.$createElement;
+ this.$prompt(
+ h("p", {style: "color: #F56C6C"}, "一旦驳回无法进行后续操作"),
+ "请核对招聘信息后再进行审核通过",
+ {
+ distinguishCancelAndClose: true,
+ confirmButtonText: "通 过",
+ cancelButtonText: "驳 回",
type: "warning",
- message: "审核失败",
- });
+ center: true,
+ inputType: "textarea",
+ inputPlaceholder: "备注驳回原因",
+ beforeClose: function (action, instance, done) {
+ if (action === 'cancel') {
+ if (!instance.inputValue) {
+ return this.$message({
+ type: "info",
+ message: "请输入驳回原因!",
+ });
+ }
+ self.handelFetchAuditing(idList, 9, instance.inputValue, "成功驳回, 操作成功!").then(() => done())
+ } else if (action === 'confirm') {
+ self.handelFetchAuditing(idList, 0, instance.inputValue).then(() => done())
+ } else {
+ done()
+ }
+ }
+ }
+ )
}
},
- handleCheck(row) {
- this.centerDialogVisible = true
- this.AuditingData = row
+ handelFetchAuditing(idList, reviewState, msg, message) {
+ return new Promise((resolve, reject) => {
+ let arr = idList.map((item) => ({
+ id: item,
+ reviewState: reviewState,
+ reviewMsg: msg || '',
+ jobType: 2,
+ }))
+ this.loading = true;
+ Auditing(arr).then(() => {
+ this.loading = false;
+ this.onLoad(this.page, this.params);
+ this.$message({
+ type: message ? "info" : "success",
+ message: message || "审核通过,操作成功!",
+ });
+ resolve()
+ }).catch(() => {
+ this.loading = false;
+ reject()
+ });
+ })
},
},
};
diff --git a/src/views/manage/works/index.vue b/src/views/manage/works/index.vue
index 701e03e..63ad857 100644
--- a/src/views/manage/works/index.vue
+++ b/src/views/manage/works/index.vue
@@ -59,6 +59,26 @@
>
+
+
+
+
+
+
+
+
+
+
{
- if (ele.jobStatus == 1 && ele.id == this.ids[i]) {
+ if (ele.id == this.ids[i]) {
idList.push(ele.id);
}
});
@@ -466,34 +504,57 @@ export default {
let h = this.$createElement;
this.$prompt(
h("p", { style: "color: #F56C6C" }, "一旦驳回无法进行后续操作"),
- "您确定要驳回此任务吗?",
+ "请核对招聘信息后再进行审核通过",
{
- confirmButtonText: "确定",
- cancelButtonText: "取消",
+ distinguishCancelAndClose: true,
+ confirmButtonText: "通 过",
+ cancelButtonText: "驳 回",
type: "warning",
center: true,
inputType: "textarea",
inputPlaceholder: "备注驳回原因",
+ beforeClose: function(action, instance, done) {
+ if(action === 'cancel') {
+ if (!instance.inputValue) {
+ return this.$message({
+ type: "info",
+ message: "请输入驳回原因!",
+ });
+ }
+ self.handelFetchAuditing(idList, 9, instance.inputValue, "成功驳回, 操作成功!").then(() => done())
+ } else if(action === 'confirm') {
+ self.handelFetchAuditing(idList, 0, instance.inputValue).then(() => done())
+ } else {
+ done()
+ }
+ }
}
)
- .then(({ value }) => {
- this.loading = true;
- review(idList.join(","), value)
- .then(() => {
- this.loading = false;
- this.onLoad(this.page, this.params);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- })
- .catch(() => {
- this.loading = false;
- });
- })
- .catch(() => {});
}
},
+ handelFetchAuditing(idList, reviewState, msg, message) {
+ return new Promise((resolve, reject) => {
+ let arr = idList.map((item) => ({
+ id: item,
+ reviewState: reviewState,
+ reviewMsg: msg || '',
+ jobType: 1,
+ }))
+ this.loading = true;
+ Auditing(arr).then(() => {
+ this.loading = false;
+ this.onLoad(this.page, this.params);
+ this.$message({
+ type: message ? "info" : "success",
+ message: message || "审核通过,操作成功!",
+ });
+ resolve()
+ }).catch(() => {
+ this.loading = false;
+ reject()
+ });
+ })
+ },
downRecords() {
if (this.query.time) {
this.query.stime = this.query.time[0];
diff --git a/src/views/util/mission-view.vue b/src/views/util/mission-view.vue
index f275e64..385d206 100644
--- a/src/views/util/mission-view.vue
+++ b/src/views/util/mission-view.vue
@@ -182,6 +182,28 @@
+
+
+
+
+
+
+
+ {{
+ recruit[model.reviewState]
+ }}
+
+
+
+
+ {{
+ model.reviewMsg || '无'
+ }}
+
+
+
@@ -195,6 +217,7 @@ import {
wageUnitCategoryState,
educationState,
genderState,
+ recruitStatus
} from "@/common/dic";
function getDic(arr) {
@@ -210,10 +233,11 @@ export default {
props: { model: Object },
data() {
return {
- activeNames: ["1", "2", "3", "4"],
+ activeNames: ["1", "2", "3", "4", "5"],
wageUnitCategory: getDic(wageUnitCategoryState),
education: getDic(educationState),
gender: getDic(genderState),
+ recruit: getDic(recruitStatus),
};
},
mounted() { },
diff --git a/src/views/util/post-view.vue b/src/views/util/post-view.vue
index f56c057..e94c0a9 100644
--- a/src/views/util/post-view.vue
+++ b/src/views/util/post-view.vue
@@ -182,6 +182,28 @@
+
+
+
+
+
+
+
+ {{
+ recruit[model.reviewState]
+ }}
+
+
+
+
+ {{
+ model.reviewMsg || '无'
+ }}
+
+
+
@@ -194,7 +216,7 @@ import { dateFormat } from "@/util/date";
import {
wageUnitCategoryState,
educationState,
- genderState,
+ genderState, recruitStatus,
} from "@/common/dic";
function getDic(arr) {
@@ -210,10 +232,11 @@ export default {
props: { model: Object },
data() {
return {
- activeNames: ["1", "2", "3", "4"],
+ activeNames: ["1", "2", "3", "4", "5"],
wageUnitCategory: getDic(wageUnitCategoryState),
education: getDic(educationState),
gender: getDic(genderState),
+ recruit: getDic(recruitStatus),
};
},
mounted() { },
diff --git a/vue.config.js b/vue.config.js
index 5946086..e421097 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -24,9 +24,9 @@ module.exports = {
proxy: {
"/api": {
// target: 'http://localhost:8000', // 本地服务接口地址
- target: "http://39.98.184.58:8000", // 阿里云后台地址
+ // target: "http://39.98.184.58:8000", // 阿里云后台地址
// target: "http://192.168.3.108:8000", // 本地
- // target: 'http://192.168.3.111:8000',
+ target: 'http://192.168.3.111:8000',
ws: true,
changeOrigin: true,
pathRewrite: {