|
@@ -2,10 +2,10 @@
|
|
|
<el-dialog :title="'模板配置(' + dialogTitle + ')'" v-model="dialogVisible" draggable width="900px">
|
|
|
<el-form :model="state.queryParams" ref="ruleDialogFormRef" inline @submit.native.prevent>
|
|
|
<el-form-item label="关键字查询" prop="Keyword">
|
|
|
- <el-input v-model="state.queryParams.Keyword" placeholder="模板名称/编码" clearable @keyup.enter="queryList" />
|
|
|
+ <el-input v-model="state.queryParams.Keyword" placeholder="模板名称/编码" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
<el-button @click="resetQuery(ruleDialogFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -37,10 +37,9 @@
|
|
|
|
|
|
<script lang="tsx" setup name="workflowConfig">
|
|
|
import { reactive, ref } from 'vue';
|
|
|
-import { ElButton, ElMessage, FormInstance } from 'element-plus';
|
|
|
+import { ElMessage, FormInstance } from 'element-plus';
|
|
|
import { wfmodulesMatch, workflowList } from '@/api/system/workflow';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
-import { throttle } from '@/utils/tools';
|
|
|
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
const emit = defineEmits(['updateList', 'openDialog', 'closeDialog']);
|
|
@@ -93,7 +92,11 @@ const openDialog = async (row: any) => {
|
|
|
state.loading = false;
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+/** 搜索按钮操作 */
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+}
|
|
|
const queryList = () => {
|
|
|
state.loading = true;
|
|
|
workflowList(state.queryParams)
|
|
@@ -106,11 +109,11 @@ const queryList = () => {
|
|
|
state.loading = false;
|
|
|
});
|
|
|
};
|
|
|
-const resetQuery = throttle((formEl: FormInstance | undefined) => {
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
if (!formEl) return;
|
|
|
formEl.resetFields();
|
|
|
queryList();
|
|
|
-}, 500);
|
|
|
+}
|
|
|
|
|
|
// 选择重复件
|
|
|
const handleSelectionChange = (row: any) => {
|