diff --git a/src/components/promptDialog/index.vue b/src/components/promptDialog/index.vue new file mode 100644 index 0000000..cc87812 --- /dev/null +++ b/src/components/promptDialog/index.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/views/manage/mission/index.vue b/src/views/manage/mission/index.vue index 35071ed..79b5f9a 100644 --- a/src/views/manage/mission/index.vue +++ b/src/views/manage/mission/index.vue @@ -184,6 +184,21 @@ + @@ -204,6 +219,7 @@ import zpView from "./zpView"; import {missionState, wageUnitCategoryState, recruitStatus, dataSourcesEnum, educationState} from "@/common/dic"; import {calcDate} from "@/util/date"; import {Message} from "element-ui"; +import PromptDialog from "@/components/promptDialog/index.vue"; const wageUnitCategoryStateEnum = {} wageUnitCategoryState.map((item) => { @@ -220,10 +236,12 @@ const message = lodash.throttle( ); export default { - components: {missionView, zpView}, + components: {missionView, zpView, PromptDialog}, name: "manage_mission", data() { return { + dialogFlag: false, + selectIdList: [], recruitStatus, dataSourcesEnum, educationState, @@ -557,37 +575,26 @@ export default { if (idList.length == 0) { this.$message.error("只能驳回【招聘中】的任务"); } else { - let h = this.$createElement; - this.$prompt( - h("p", {style: "color: #F56C6C"}, "一旦驳回无法进行后续操作"), - "请核对招聘信息后再进行审核通过", - { - 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, 1, instance.inputValue).then(() => done()) - } else { - done() - } - } - } - ) + this.dialogFlag = true + this.selectIdList = idList } }, + diaLogCancel(value) { + if (!value) { + return this.$message({ + type: "info", + message: "请输入驳回原因!", + }); + } + this.handelFetchAuditing(this.selectIdList, 9, value, "成功驳回, 操作成功!").then(() => { + this.dialogFlag = false + }) + }, + diaLogConfirm(value) { + this.handelFetchAuditing(this.selectIdList, 1, value).then(() => { + this.dialogFlag = false + }) + }, handelFetchAuditing(idList, reviewState, msg, message) { return new Promise((resolve, reject) => { let arr = idList.map((item) => ({ diff --git a/src/views/manage/works/index.vue b/src/views/manage/works/index.vue index b6cfc74..2e466ab 100644 --- a/src/views/manage/works/index.vue +++ b/src/views/manage/works/index.vue @@ -69,10 +69,12 @@ size="small" icon="el-icon-search" @click="searchChange1" - >搜 索搜 索 + 清 空清 空 + @@ -104,7 +106,8 @@ size="small" @click.stop="handleCheck" type="primary" - >审核审核 +