vue3 -> vue2

This commit is contained in:
2025-08-07 11:48:20 +08:00
parent 34b0054be7
commit 84be9fe4ec

View File

@@ -106,13 +106,11 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts"></script>
<script> <script lang="ts">
import { useDictStore } from '@/store/modules/dict'; import { useDictStore } from '@/store/modules/dict';
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'; import { addType, delType, getType, listType, refreshCache, updateType } from '@/api/system/dict/type';
import { DictTypeForm, DictTypeQuery, DictTypeVO } from '@/api/system/dict/type/types';
import { addDateRange } from '@/utils/ruoyi'; import { addDateRange } from '@/utils/ruoyi';
import { UserForm } from '@/api/system/user/types.js';
const initFormData = { const initFormData = {
userId: undefined, userId: undefined,
@@ -200,13 +198,13 @@ export default {
this.dialog.title = '添加学生类型'; this.dialog.title = '添加学生类型';
}, },
/** 多选框选中数据 */ /** 多选框选中数据 */
handleSelectionChange(selection: DictTypeVO[]) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.dictId); this.ids = selection.map((item) => item.dictId);
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
async handleUpdate (row) { async handleUpdate(row) {
this.reset(); this.reset();
const dictId = row?.dictId || this.ids.value[0]; const dictId = row?.dictId || this.ids.value[0];
const res = await getType(dictId); const res = await getType(dictId);
@@ -229,7 +227,7 @@ export default {
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
async handleDelete (row) { async handleDelete(row) {
const dictIds = row?.dictId || this.ids.value; const dictIds = row?.dictId || this.ids.value;
await this.$confirm('是否确认删除学生编号为"' + dictIds + '"的数据项?'); await this.$confirm('是否确认删除学生编号为"' + dictIds + '"的数据项?');
await delType(dictIds); await delType(dictIds);
@@ -240,11 +238,9 @@ export default {
}); });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {},
},
/** 刷新缓存按钮操作 */ /** 刷新缓存按钮操作 */
async handleRefreshCache () { async handleRefreshCache() {
await refreshCache(); await refreshCache();
this.$message.success('刷新成功'); this.$message.success('刷新成功');
useDictStore().cleanDict(); useDictStore().cleanDict();