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