flat: 合并
This commit is contained in:
@@ -17,7 +17,14 @@
|
||||
@refresh-change="refreshChange"
|
||||
@search-reset="searchReset"
|
||||
>
|
||||
|
||||
<template slot-scope="{ row }" slot="menu">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="updateRow(row)"
|
||||
><i class="el-icon-share"></i>处理
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</el-drawer>
|
||||
</template>
|
||||
@@ -25,6 +32,7 @@
|
||||
<script>
|
||||
import {
|
||||
getQueryEmploymentSurveyUserBySurveyId,
|
||||
disposeEmploymentSurveyManage
|
||||
} from '@/api/manage/survey'
|
||||
|
||||
const initPages = {
|
||||
@@ -32,6 +40,18 @@ const initPages = {
|
||||
currentPage: 1,
|
||||
total: 100,
|
||||
}
|
||||
const classIsDeleted = {
|
||||
0: '否',
|
||||
1: '是',
|
||||
}
|
||||
const classStatus = {
|
||||
0: '未处理',
|
||||
1: '已处理',
|
||||
2: '关闭'
|
||||
}
|
||||
const classEnumStatus = Object.keys(classStatus).map((item) => ({
|
||||
label: classStatus[item], value: Number(item)
|
||||
}))
|
||||
export default {
|
||||
props: {
|
||||
visible: Boolean,
|
||||
@@ -58,7 +78,6 @@ export default {
|
||||
border: true,
|
||||
columnBtn: false,
|
||||
refreshBtn: false,
|
||||
menu: false,
|
||||
tip: false,
|
||||
selection: true,
|
||||
searchMenuSpan: 6,
|
||||
@@ -85,6 +104,17 @@ export default {
|
||||
}, {
|
||||
label: '创建时间',
|
||||
prop: 'createTime',
|
||||
}, {
|
||||
label: "是否处理",
|
||||
prop: "status",
|
||||
type: "select",
|
||||
dicData: classEnumStatus,
|
||||
search: true,
|
||||
},
|
||||
{
|
||||
label: "处置情况",
|
||||
prop: "disposalSituation",
|
||||
search: true,
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -136,6 +166,37 @@ export default {
|
||||
this.page.currentPage = 1
|
||||
this.onLoad();
|
||||
},
|
||||
updateRow(row) {
|
||||
const _this = this
|
||||
let h = this.$createElement;
|
||||
this.$prompt("回复处理", // "请核对信息后",
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: "完 成",
|
||||
cancelButtonText: "取 消",
|
||||
center: true,
|
||||
inputType: "textarea",
|
||||
inputPlaceholder: "处理内容",
|
||||
beforeClose: async function (action, instance, done) {
|
||||
if (action === 'confirm') {
|
||||
const disposalSituation = instance.inputValue
|
||||
if (!disposalSituation) {
|
||||
this.$message({type: "info", message: "请输入处理内容"});
|
||||
} else {
|
||||
let resData = await disposeEmploymentSurveyManage({id: row.id, disposalSituation, status: 1})
|
||||
if (resData.data.code === 200) {
|
||||
this.$message({type: "success", message: "操作成功"});
|
||||
done()
|
||||
_this.onLoad();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
onLoad() {
|
||||
if (!this.rowData) return
|
||||
return new Promise(async (resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user