|
@@ -1,5 +1,13 @@
|
|
|
<template>
|
|
|
- <el-dialog :title="'模板配置(' + dialogTitle + ')'" v-model="dialogVisible" draggable width="900px">
|
|
|
+ <el-dialog
|
|
|
+ :title="'模板配置(' + dialogTitle + ')'"
|
|
|
+ v-model="dialogVisible"
|
|
|
+ draggable
|
|
|
+ width="900px"
|
|
|
+ @close="close"
|
|
|
+ append-to-body
|
|
|
+ destroy-on-close
|
|
|
+ >
|
|
|
<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="handleQuery" />
|
|
@@ -43,7 +51,7 @@
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false" class="default-button">取 消</el-button>
|
|
|
- <el-button type="primary" @click="onSubmit" :disabled="!state.tableRadio">保 存</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit" :disabled="!selectRow.id">保 存</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -60,22 +68,6 @@ const pagination = defineAsyncComponent(() => import('@/components/ProTable/comp
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
const emit = defineEmits(['updateList', 'openDialog', 'closeDialog']);
|
|
|
|
|
|
-const proTableRef = ref<RefType>(); // 表格ref
|
|
|
-// 表格配置项
|
|
|
-const columns = ref<any[]>([
|
|
|
- { type: 'radio', fixed: 'left', width: 80, label: '请选择' },
|
|
|
- { prop: 'name', label: '模板名称', width: 300 },
|
|
|
- { prop: 'version', label: '模板版本号' },
|
|
|
- { prop: 'code', label: '模板编码' },
|
|
|
- {
|
|
|
- prop: 'creationTime',
|
|
|
- label: '创建时间',
|
|
|
- width: 170,
|
|
|
- render: (scope) => {
|
|
|
- return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
- },
|
|
|
- },
|
|
|
-]);
|
|
|
// 定义变量内容
|
|
|
const state = reactive({
|
|
|
tableData: [], // 表格数据
|
|
@@ -98,7 +90,7 @@ const dialogTitle = ref(''); // 弹窗标题
|
|
|
const openDialog = async (row: any) => {
|
|
|
dialogVisible.value = true;
|
|
|
try {
|
|
|
- queryList();
|
|
|
+ handleQuery();
|
|
|
state.rowCode = row.code;
|
|
|
if (row.definitionId) state.tableRadio = row.definitionId;
|
|
|
else state.tableRadio = '';
|
|
@@ -138,9 +130,14 @@ const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
const closeDialog = () => {
|
|
|
dialogVisible.value = false;
|
|
|
};
|
|
|
-const selectRow = ref<any>(null);
|
|
|
+const close = () => {
|
|
|
+ selectRow.value = {};
|
|
|
+};
|
|
|
+const selectRow = ref<EmptyObjectType>({});
|
|
|
const radioChangeEvent = ({ row }) => {
|
|
|
selectRow.value = row;
|
|
|
+ state.tableRadio = '';
|
|
|
+ console.log(row, '11');
|
|
|
};
|
|
|
// 选择模板
|
|
|
const onSubmit = () => {
|