|
@@ -78,7 +78,7 @@ const handleTableRowBtn_import = async ({ file }: { file: File }) => {
|
|
|
}
|
|
|
}
|
|
|
const handleTableRowBtn_export = () => {
|
|
|
- if(multipleSelection.value.length===0) return ElMessage.info('请先勾选导出文件');exportApi({[TABLE_KEY]:multipleSelection.value.map((item: TYPE_TABLE_FIELD)=>item[TABLE_KEY])?.join()})
|
|
|
+ if (multipleSelection.value.length === 0) return ElMessage.info('请先勾选导出文件'); exportApi({ [TABLE_KEY]: multipleSelection.value.map((item: TYPE_TABLE_FIELD) => item[TABLE_KEY])?.join() })
|
|
|
}
|
|
|
const handleTableRowBtn_add = () => {
|
|
|
whichDialogSubmit = 'add'
|
|
@@ -86,7 +86,7 @@ const handleTableRowBtn_add = () => {
|
|
|
dialogVisible_addOrEdit.value = true
|
|
|
}
|
|
|
const handleTableRowBtn_delete = async () => {
|
|
|
- if(multipleSelection.value.length===0) return ElMessage.info('请先勾选文件');const resp = await deleteApi(multipleSelection.value.map((item: TYPE_TABLE_FIELD) => item[TABLE_KEY]));if(resp.code!=='1')return;ElMessage.success('删除成功');
|
|
|
+ if (multipleSelection.value.length === 0) return ElMessage.info('请先勾选文件'); const resp = await deleteApi(multipleSelection.value.map((item: TYPE_TABLE_FIELD) => item[TABLE_KEY])); if (resp.code !== '1') return; ElMessage.success('删除成功');
|
|
|
queryApi()
|
|
|
}
|
|
|
// #endregion
|
|
@@ -111,7 +111,7 @@ const handleTableColBtn_detail = (scope: { row: TYPE_TABLE_FIELD }) => {
|
|
|
router.push({ name: DetailName, params: { [DetailParam]: scope.row[TABLE_KEY] } })
|
|
|
}
|
|
|
const handleTableColBtn_delete = async (scope: { row: TYPE_TABLE_FIELD }) => {
|
|
|
- const resp = await deleteApi(scope.row[TABLE_KEY]);if(resp.code!=='1')return;ElMessage.success('删除成功');
|
|
|
+ const resp = await deleteApi(scope.row[TABLE_KEY]); if (resp.code !== '1') return; ElMessage.success('删除成功');
|
|
|
queryApi()
|
|
|
}
|
|
|
// #endregion
|
|
@@ -133,7 +133,7 @@ const handleDialogFormBtn_submit = async (formRefKey: string, extendData?: Parti
|
|
|
const isValid = await (instance?.refs[formRefKey] as FormInstance).validate((valid: boolean) => valid)
|
|
|
if (isValid) {
|
|
|
const resp = await API_MAP[whichDialogSubmit](<TYPE_TABLE_FIELD>({ ...dialogForm_Data.value, ...extendData }))
|
|
|
- if(resp.code!=='1')return;ElMessage.success('操作成功');handleDialogFormBtn_cancel()
|
|
|
+ if (resp.code !== '1') return; ElMessage.success('操作成功'); handleDialogFormBtn_cancel()
|
|
|
queryApi()
|
|
|
if (formRefKey === 'dialogForm_Ref_audit') {
|
|
|
ElMessage.success('已提醒相关老师')
|
|
@@ -141,6 +141,14 @@ const handleDialogFormBtn_submit = async (formRefKey: string, extendData?: Parti
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+const handleTableColBtn_audit1 = async (scope: { row: TYPE_TABLE_FIELD }) => {
|
|
|
+ const resp = await editApi({ [TABLE_KEY]: scope.row[TABLE_KEY], xtw_shzt: '1' })
|
|
|
+ if (resp.code !== '1') return;
|
|
|
+ queryApi()
|
|
|
+
|
|
|
+ ElMessage.success('已提醒相关老师')
|
|
|
+
|
|
|
+}
|
|
|
const handleDialogFormBtn_cancel = (formRefKey?: string) => {
|
|
|
dialogVisible_addOrEdit.value = false
|
|
|
dialogVisible_audit.value = false
|
|
@@ -275,7 +283,7 @@ function importApi(data: { file: File }) {
|
|
|
}
|
|
|
|
|
|
function exportApi(d) {
|
|
|
- return download(URL_CUT + '/index', {...queryForm_Data.value,...d})
|
|
|
+ return download(URL_CUT + '/index', { ...queryForm_Data.value, ...d })
|
|
|
}
|
|
|
|
|
|
const API_MAP = {
|
|
@@ -417,7 +425,11 @@ init()
|
|
|
<el-table-column label="操作" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_edit(scope)" type="primary" >编辑</el-button> -->
|
|
|
- <el-button link :auto-insert-space="false" @click="handleTableColBtn_audit(scope)" type="primary" :disabled="scope.row.xtw_shzt !== '3'">审核
|
|
|
+ <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_audit(scope)" type="primary"
|
|
|
+ :disabled="scope.row.xtw_shzt !== '3'">审核
|
|
|
+ </el-button> -->
|
|
|
+ <el-button link :auto-insert-space="false" @click="handleTableColBtn_audit1(scope)" type="primary"
|
|
|
+ :disabled="scope.row.xtw_shzt !== '3'">通过
|
|
|
</el-button>
|
|
|
<!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_detail(scope)" type="primary" >详情</el-button> -->
|
|
|
<!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_delete(scope)" type="primary" >删除</el-button> -->
|