flat: 暂存
This commit is contained in:
@@ -59,6 +59,26 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态:">
|
||||
<el-select v-model="query.reviewState">
|
||||
<el-option
|
||||
v-for="(item, index) in recruitStatus"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源:">
|
||||
<el-select v-model="query.dataSources">
|
||||
<el-option
|
||||
v-for="(item, index) in dataSourcesEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div class="searchBtn">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -115,7 +135,7 @@
|
||||
v-if="vaildData(permission.manage_mission_check, false) && row.reviewState === 1"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="handleCheck(row)"
|
||||
@click.stop="handleCheck"
|
||||
>审核</el-button
|
||||
>
|
||||
</template>
|
||||
@@ -123,19 +143,6 @@
|
||||
<el-drawer title="详情" :visible.sync="viewDrawer" size="60%">
|
||||
<post-view :model="view"></post-view>
|
||||
</el-drawer>
|
||||
<el-dialog
|
||||
title="审核"
|
||||
:visible.sync="centerDialogVisible"
|
||||
width="30%"
|
||||
append-to-body
|
||||
center>
|
||||
<span>请核对招聘信息后再进行审核通过</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||
<el-button type="warning" @click="handelAuditing(0)">不通过</el-button>
|
||||
<el-button type="primary" @click="handelAuditing(9)">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
@@ -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()
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user