Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
# Conflicts: # frontend/src/views/plan/autoTest/components/tree.vue
This commit is contained in:
@@ -3,24 +3,32 @@ import { ADMIN as rePrefix } from "@/api/config/serviceName";
|
|||||||
import type { Function } from "@/api/function/interface";
|
import type { Function } from "@/api/function/interface";
|
||||||
|
|
||||||
|
|
||||||
//获取菜单列表
|
|
||||||
export const getFunctionList = (params: Function.ReqFunctionParams) => {
|
// 获取资源
|
||||||
return http.post(`/function/list`, params);
|
export const getFunctionList = () => {
|
||||||
};
|
return http.get<Function.ResFunction>(`/sysFunction/functionTree`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取资源不包括按钮
|
||||||
|
export const getFunctionListNoButton = () => {
|
||||||
|
return http.get<Function.ResFunction>(`/sysFunction/functionTreeNoButton`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//添加菜单列表
|
//添加菜单列表
|
||||||
export const addFunction = (params: Function.ResFunction) => {
|
export const addFunction = (params: Function.ResFunction) => {
|
||||||
return http.post(`/function/add`,params);
|
return http.post(`/sysFunction/add`,params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//删除菜单列表
|
//删除菜单列表
|
||||||
export const deleteFunction = (params: { id: string[] }) => {
|
export const deleteFunction = (params: Function.ResFunction) => {
|
||||||
return http.post(`/function/delete`, { data: params });
|
return http.post(`/sysFunction/delete?id=${params.id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
//编辑菜单列表
|
//编辑菜单列表
|
||||||
export const updateFunction = (params: Function.ResFunction) => {
|
export const updateFunction = (params: Function.ResFunction) => {
|
||||||
return http.put(`/function/update`, params);
|
return http.put(`/sysFunction/update`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
frontend/src/assets/icons/loading.svg
Normal file
1
frontend/src/assets/icons/loading.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1731580516863" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1484" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M469.333333 85.333333m42.666667 0l0 0q42.666667 0 42.666667 42.666667l0 128q0 42.666667-42.666667 42.666667l0 0q-42.666667 0-42.666667-42.666667l0-128q0-42.666667 42.666667-42.666667Z" fill="#f38d0d" opacity=".8" p-id="1485"></path><path d="M469.333333 725.333333m42.666667 0l0 0q42.666667 0 42.666667 42.666667l0 128q0 42.666667-42.666667 42.666667l0 0q-42.666667 0-42.666667-42.666667l0-128q0-42.666667 42.666667-42.666667Z" fill="#f38d0d" opacity=".4" p-id="1486"></path><path d="M938.666667 469.333333m0 42.666667l0 0q0 42.666667-42.666667 42.666667l-128 0q-42.666667 0-42.666667-42.666667l0 0q0-42.666667 42.666667-42.666667l128 0q42.666667 0 42.666667 42.666667Z" fill="#f38d0d" opacity=".2" p-id="1487"></path><path d="M298.666667 469.333333m0 42.666667l0 0q0 42.666667-42.666667 42.666667l-128 0q-42.666667 0-42.666667-42.666667l0 0q0-42.666667 42.666667-42.666667l128 0q42.666667 0 42.666667 42.666667Z" fill="#f38d0d" opacity=".6" p-id="1488"></path><path d="M783.530667 180.138667m30.169889 30.169889l0 0q30.169889 30.169889 0 60.339779l-90.509668 90.509668q-30.169889 30.169889-60.339779 0l0 0q-30.169889-30.169889 0-60.339779l90.509668-90.509668q30.169889-30.169889 60.339779 0Z" fill="#f38d0d" opacity=".1" p-id="1489"></path><path d="M330.965333 632.661333m30.16989 30.16989l0 0q30.169889 30.169889 0 60.339778l-90.509668 90.509668q-30.169889 30.169889-60.339779 0l0 0q-30.169889-30.169889 0-60.339778l90.509668-90.509668q30.169889-30.169889 60.339779 0Z" fill="#f38d0d" opacity=".5" p-id="1490"></path><path d="M843.861333 783.530667m-30.169889 30.169889l0 0q-30.169889 30.169889-60.339779 0l-90.509668-90.509668q-30.169889-30.169889 0-60.339779l0 0q30.169889-30.169889 60.339779 0l90.509668 90.509668q30.169889 30.169889 0 60.339779Z" fill="#f38d0d" opacity=".3" p-id="1491"></path><path d="M391.338667 330.965333m-30.16989 30.16989l0 0q-30.169889 30.169889-60.339778 0l-90.509668-90.509668q-30.169889-30.169889 0-60.339779l0 0q30.169889-30.169889 60.339778 0l90.509668 90.509668q30.169889 30.169889 0 60.339779Z" fill="#f38d0d" opacity=".7" p-id="1492"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -27,14 +27,13 @@ const dialogVisible = ref<Boolean>(false);
|
|||||||
const dialogTitle = ref<string>("");
|
const dialogTitle = ref<string>("");
|
||||||
const openDialog = (title: string) => {
|
const openDialog = (title: string) => {
|
||||||
dialogTitle.value = title;
|
dialogTitle.value = title;
|
||||||
console.log(dialogVisible.value);
|
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog,
|
openDialog,
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const findIndex = () => {
|
|||||||
}, 0)
|
}, 0)
|
||||||
if (!find) hiddenIndex.value = -1
|
if (!find) hiddenIndex.value = -1
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// console.warn(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
})
|
})
|
||||||
// 证明在开始阶段
|
// 证明在开始阶段
|
||||||
if (input.selectionStart == 0) {
|
if (input.selectionStart == 0) {
|
||||||
//console.log('鼠标设置了,', index)
|
|
||||||
markFlag.value[index].left = true
|
markFlag.value[index].left = true
|
||||||
} else {
|
} else {
|
||||||
markFlag.value[index].left = false
|
markFlag.value[index].left = false
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
// 检查ip输入
|
// 检查ip输入
|
||||||
const checkIpVal = (item: any) => {
|
const checkIpVal = (item: any) => {
|
||||||
let val = item.value;
|
let val = item.value;
|
||||||
//console.log(val, '===========')
|
|
||||||
// 处理非数字
|
// 处理非数字
|
||||||
val = val.toString().replace(/[^0-9]/g, "");
|
val = val.toString().replace(/[^0-9]/g, "");
|
||||||
val = parseInt(val, 10);
|
val = parseInt(val, 10);
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
item.value = val;
|
item.value = val;
|
||||||
//console.log(item.value, '=========')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断光标左右移动位置
|
// 判断光标左右移动位置
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
markFlag.value[index].left = false
|
markFlag.value[index].left = false
|
||||||
markFlag.value[index].right = false
|
markFlag.value[index].right = false
|
||||||
} else {
|
} else {
|
||||||
console.log('左键设置了,', index)
|
|
||||||
markFlag.value[index].left = true
|
markFlag.value[index].left = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -170,19 +170,19 @@
|
|||||||
markFlag.value[index].right = false
|
markFlag.value[index].right = false
|
||||||
}
|
}
|
||||||
} else if (e.keyCode === 8) {
|
} else if (e.keyCode === 8) {
|
||||||
//console.log('删除键把当前数据删除完毕后会跳转到前一个input')
|
|
||||||
// 删除键把当前数据删除完毕后会跳转到前一个input,左一不做任何处理
|
// 删除键把当前数据删除完毕后会跳转到前一个input,左一不做任何处理
|
||||||
if (index !== 0 && e.currentTarget.selectionStart === 0) {
|
if (index !== 0 && e.currentTarget.selectionStart === 0) {
|
||||||
if (markFlag.value[index].left) {
|
if (markFlag.value[index].left) {
|
||||||
ipInputRefs.value[index - 1].focus();
|
ipInputRefs.value[index - 1].focus();
|
||||||
markFlag.value[index].left = false
|
markFlag.value[index].left = false
|
||||||
} else {
|
} else {
|
||||||
//console.log('左键设置了删除,', index)
|
|
||||||
markFlag.value[index].left = true
|
markFlag.value[index].left = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (e.keyCode === 13 || e.keyCode === 32) {
|
} else if (e.keyCode === 13 || e.keyCode === 32) {
|
||||||
//console.log('回车键、空格键、冒号均向右跳转,右一不做任何措施')
|
|
||||||
// 回车键、空格键、冒号均向右跳转,右一不做任何措施
|
// 回车键、空格键、冒号均向右跳转,右一不做任何措施
|
||||||
if (index !== 3) {
|
if (index !== 3) {
|
||||||
ipInputRefs.value[index + 1].focus();
|
ipInputRefs.value[index + 1].focus();
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
}
|
}
|
||||||
else if (e.keyCode === 110 || e.keyCode === 190) {
|
else if (e.keyCode === 110 || e.keyCode === 190) {
|
||||||
// 点 . 向右跳转,右一不做任何措施
|
// 点 . 向右跳转,右一不做任何措施
|
||||||
// console.log('点击')
|
|
||||||
if (item.value == '') {
|
if (item.value == '') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (item.value.toString().length === 3) {
|
else if (item.value.toString().length === 3) {
|
||||||
//console.log('满3位,光标自动向下一个文本框')
|
|
||||||
// 满3位,光标自动向下一个文本框.
|
// 满3位,光标自动向下一个文本框.
|
||||||
if (index !== 3) {
|
if (index !== 3) {
|
||||||
//ipInputRefs.value[index + 1].setSelectionRange(0, 0)
|
//ipInputRefs.value[index + 1].setSelectionRange(0, 0)
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
} else {
|
} else {
|
||||||
if (direction == 'toRight') {
|
if (direction == 'toRight') {
|
||||||
// 可以直接跳回
|
// 可以直接跳回
|
||||||
//console.log('右键focus,', index)
|
|
||||||
markFlag.value[index].left = true
|
markFlag.value[index].left = true
|
||||||
// 设置光标为左边第一个
|
// 设置光标为左边第一个
|
||||||
ipInputRefs.value[index].setSelectionRange(0, 0)
|
ipInputRefs.value[index].setSelectionRange(0, 0)
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
|
|
||||||
// 监听数据变化,并初始化显示四个数据
|
// 监听数据变化,并初始化显示四个数据
|
||||||
watch(() => props.value, () => {
|
watch(() => props.value, () => {
|
||||||
//console.log('变化了~', props.value);
|
|
||||||
if(flag.value){
|
if(flag.value){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -317,7 +317,9 @@
|
|||||||
height: 35px;
|
height: 35px;
|
||||||
padding-inline-start: 0px;
|
padding-inline-start: 0px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 20px;
|
||||||
|
padding-top: 0px;
|
||||||
|
padding-bottom: 0px;;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const timeUnits = ref<TimeUnit[]>(
|
|||||||
// 发出日期变化事件
|
// 发出日期变化事件
|
||||||
const emitDateChange = () => {
|
const emitDateChange = () => {
|
||||||
emit('update-dates', formatDate(startDate.value), formatDate(endDate.value))
|
emit('update-dates', formatDate(startDate.value), formatDate(endDate.value))
|
||||||
//console.log('emitDateChange', startDate.value, endDate.value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 在组件挂载时更新日期范围
|
// 在组件挂载时更新日期范围
|
||||||
@@ -138,7 +138,7 @@ const updateDateRange = () => {
|
|||||||
} else if (timeUnit.value === '周') {
|
} else if (timeUnit.value === '周') {
|
||||||
startDate.value = getStartOfWeek(today.value)
|
startDate.value = getStartOfWeek(today.value)
|
||||||
endDate.value = getEndOfWeek(today.value)
|
endDate.value = getEndOfWeek(today.value)
|
||||||
//console.log(endDate.value.toLocaleDateString())
|
|
||||||
} else if (timeUnit.value === '月') {
|
} else if (timeUnit.value === '月') {
|
||||||
// 获取本月的开始和结束日期
|
// 获取本月的开始和结束日期
|
||||||
startDate.value = new Date(today.value.getFullYear(), today.value.getMonth(), 1);
|
startDate.value = new Date(today.value.getFullYear(), today.value.getMonth(), 1);
|
||||||
@@ -167,7 +167,7 @@ const updateDateRange = () => {
|
|||||||
|
|
||||||
// // 确保结束日期不超过今天
|
// // 确保结束日期不超过今天
|
||||||
// if (endDate.value > today.value) {
|
// if (endDate.value > today.value) {
|
||||||
// console.log("1111")
|
|
||||||
// endDate.value = new Date(today.value);
|
// endDate.value = new Date(today.value);
|
||||||
// endDate.value.setHours(23, 59, 59, 999); // 设置结束时间为今天的23:59:59.999
|
// endDate.value.setHours(23, 59, 59, 999); // 设置结束时间为今天的23:59:59.999
|
||||||
// }
|
// }
|
||||||
@@ -258,7 +258,7 @@ const nextPeriod = () => {
|
|||||||
updateNextButtonStatus()
|
updateNextButtonStatus()
|
||||||
}
|
}
|
||||||
const updateNextButtonStatus = () => {
|
const updateNextButtonStatus = () => {
|
||||||
//console.log(endDate.value)
|
|
||||||
// 更新下一个按钮的禁用状态
|
// 更新下一个按钮的禁用状态
|
||||||
const maxDate = new Date() // 假设最新日期为今天
|
const maxDate = new Date() // 假设最新日期为今天
|
||||||
// 将 maxDate 设置为当天的开始时间
|
// 将 maxDate 设置为当天的开始时间
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ const init = () => {
|
|||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
const resizeCharts = () => {
|
const resizeCharts = () => {
|
||||||
console.log(77777);
|
|
||||||
if (chart.value) {
|
if (chart.value) {
|
||||||
chart.value.resize();
|
chart.value.resize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ async function handleClick(this: any) {
|
|||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(this.copyData);
|
await navigator.clipboard.writeText(this.copyData);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("复制操作不被支持或失败: ", err);
|
|
||||||
}
|
}
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|||||||
@@ -39,6 +39,6 @@ export const useDownload = async (
|
|||||||
document.body.removeChild(exportFile);
|
document.body.removeChild(exportFile);
|
||||||
window.URL.revokeObjectURL(blobUrl);
|
window.URL.revokeObjectURL(blobUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const useTable = (
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
set: (newVal: any) => {
|
set: (newVal: any) => {
|
||||||
console.log("我是分页更新之后的值", newVal);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const resetRouter = () => {
|
|||||||
* */
|
* */
|
||||||
router.onError(error => {
|
router.onError(error => {
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
console.warn('路由错误', error.message)
|
//console.warn('路由错误', error.message)
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="dialogTitle" :model-value="dialogVisible" @close="close" v-bind="dialogMiddle">
|
<el-dialog :title="dialogTitle" :model-value="dialogVisible" @close="close" v-bind="dialogMiddle">
|
||||||
<el-form :model="formContent" ref='formRuleRef' :rules='rules' >
|
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' >
|
||||||
<el-form-item label="上级菜单" prop="pid" :label-width="100">
|
<el-form-item label="上级菜单" prop="pid" :label-width="100">
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-model="value"
|
v-model="value"
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<el-input v-model="formContent.component" />
|
<el-input v-model="formContent.component" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort" :label-width="100">
|
<el-form-item label="排序" prop="sort" :label-width="100">
|
||||||
<el-input-number v-model="formContent.sort" />
|
<el-input-number v-model="formContent.sort" :min='1' :max='999' />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="type" :label-width="100">
|
<el-form-item label="类型" prop="type" :label-width="100">
|
||||||
<el-select v-model="formContent.type" placeholder="请选择资源类型">
|
<el-select v-model="formContent.type" placeholder="请选择资源类型">
|
||||||
@@ -60,9 +60,10 @@
|
|||||||
import { ElMessage, FormInstance, FormItemRule } from 'element-plus'
|
import { ElMessage, FormInstance, FormItemRule } from 'element-plus'
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import { type Function } from '@/api/function/interface'
|
import { type Function } from '@/api/function/interface'
|
||||||
import {addFunction,updateFunction,} from '@/api/function/index.ts'
|
import {addFunction,updateFunction,getFunctionListNoButton} from '@/api/function/index.ts'
|
||||||
import IconSelect from '@/components/SelectIcon/index.vue'
|
import IconSelect from '@/components/SelectIcon/index.vue'
|
||||||
import { functionList } from '@/api/function/functionExample.ts'
|
import { functionList } from '@/api/function/functionExample.ts'
|
||||||
|
import { min } from 'lodash';
|
||||||
const value = ref()
|
const value = ref()
|
||||||
|
|
||||||
const data = [
|
const data = [
|
||||||
@@ -203,30 +204,23 @@ const close = () => {
|
|||||||
// 保存数据
|
// 保存数据
|
||||||
const save = () => {
|
const save = () => {
|
||||||
try {
|
try {
|
||||||
|
console.log(formContent.value)
|
||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
console.log(valid)
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
const result = await updateFunction(formContent.value);
|
await updateFunction(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addFunction(formContent.value);
|
await addFunction(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
}
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
}
|
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
await props.refreshTable!()
|
await props.refreshTable!()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('验证过程中出现错误', err)
|
//console.error('验证过程中出现错误', err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,15 +4,12 @@
|
|||||||
ref='proTable'
|
ref='proTable'
|
||||||
:columns='columns'
|
:columns='columns'
|
||||||
:request-api='getFunctionList'
|
:request-api='getFunctionList'
|
||||||
|
:pagination="false"
|
||||||
>
|
>
|
||||||
<!-- :data='userData' -->
|
<!-- :data='userData' -->
|
||||||
<!-- 表格 header 按钮 -->
|
<!-- 表格 header 按钮 -->
|
||||||
<template #tableHeader='scope'>
|
<template #tableHeader>
|
||||||
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
||||||
<el-button type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
|
|
||||||
@click='batchDelete(scope.selectedListIds)'>
|
|
||||||
批量删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 表格操作 -->
|
<!-- 表格操作 -->
|
||||||
<template #operation='scope'>
|
<template #operation='scope'>
|
||||||
@@ -43,7 +40,7 @@
|
|||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
const columns = reactive<ColumnProps<Function.ResFunction>[]>([
|
const columns = reactive<ColumnProps<Function.ResFunction>[]>([
|
||||||
{ type: 'selection', fixed: 'left', width: 70 },
|
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '名称',
|
||||||
@@ -92,10 +89,12 @@ const openDialog = (titleType: string, row: Partial<Function.ResFunction> = {})
|
|||||||
|
|
||||||
// 删除用户信息
|
// 删除用户信息
|
||||||
const handleDelete = async (params: Function.ResFunction) => {
|
const handleDelete = async (params: Function.ResFunction) => {
|
||||||
await useHandleData(deleteFunction, [params.id] , `删除【${params.name}】用户`)
|
await useHandleData(deleteFunction, params , `删除【${params.name}】用户`)
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 批量删除用户信息
|
// 批量删除用户信息
|
||||||
const batchDelete = async (id: string[]) => {
|
const batchDelete = async (id: string[]) => {
|
||||||
await useHandleData(deleteFunction, { id }, '删除所选用户信息')
|
await useHandleData(deleteFunction, { id }, '删除所选用户信息')
|
||||||
|
|||||||
@@ -105,27 +105,18 @@ const close = () => {
|
|||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
const result = await editRole(formContent.value);
|
await editRole(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addRole(formContent.value);
|
await addRole(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
}
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
}
|
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
await props.refreshTable!()
|
await props.refreshTable!()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('验证过程中出现错误', err)
|
//error('验证过程中出现错误', err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,14 +100,13 @@ const close = () => {
|
|||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
// 获取勾选的节点 ID
|
// 获取勾选的节点 ID
|
||||||
const checkedKeys = treeRef.value?.getCheckedKeys() || [];
|
const checkedKeys = treeRef.value?.getCheckedKeys() || [];
|
||||||
console.log('获取勾选的节点 ID',checkedKeys);
|
|
||||||
// 将 checkedKeys 转换为字符串数组
|
// 将 checkedKeys 转换为字符串数组
|
||||||
const checkedKeysAsString: string[] = checkedKeys.map(key => String(key));
|
const checkedKeysAsString: string[] = checkedKeys.map(key => String(key));
|
||||||
// 假设 RoleFunctionId 是一个对象,且需要 id 属性
|
// 假设 RoleFunctionId 是一个对象,且需要 id 属性
|
||||||
const roleFunctionIdObject: Role.RoleFunctionId = {
|
const roleFunctionIdObject: Role.RoleFunctionId = {
|
||||||
id: checkedKeysAsString
|
id: checkedKeysAsString
|
||||||
};
|
};
|
||||||
console.log('roleFunctionIdObject',roleFunctionIdObject);
|
|
||||||
const result = await assignFunction(formContent.value,roleFunctionIdObject);
|
const result = await assignFunction(formContent.value,roleFunctionIdObject);
|
||||||
if(result.code != 'A0000'){
|
if(result.code != 'A0000'){
|
||||||
ElMessage.error({ message: result.message})
|
ElMessage.error({ message: result.message})
|
||||||
@@ -136,12 +135,10 @@ const open = async (sign: string, data: Role.RoleBO, AllFunction: Function.ResFu
|
|||||||
if (result.code === 'A0000') {
|
if (result.code === 'A0000') {
|
||||||
// 将 result.data 转换为 Function.ResFunction[] 类型
|
// 将 result.data 转换为 Function.ResFunction[] 类型
|
||||||
const roleFunctions = result.data as Function.ResFunction[];
|
const roleFunctions = result.data as Function.ResFunction[];
|
||||||
console.log('roleFunctions',roleFunctions)
|
|
||||||
// 获取 AllFunction 中所有层级的 id
|
// 获取 AllFunction 中所有层级的 id
|
||||||
const allIds = getAllIds(AllFunction);
|
const allIds = getAllIds(AllFunction);
|
||||||
// 匹配 roleFunctions 中的 id 并设置 checkedKeys
|
// 匹配 roleFunctions 中的 id 并设置 checkedKeys
|
||||||
const checkedKeys = allIds.filter(id => roleFunctions.some(roleFunc => roleFunc.id === id));
|
const checkedKeys = allIds.filter(id => roleFunctions.some(roleFunc => roleFunc.id === id));
|
||||||
console.log('checkedKeys',checkedKeys)
|
|
||||||
// 设置 functionList 和 checkedKeys
|
// 设置 functionList 和 checkedKeys
|
||||||
functionList.value = AllFunction;
|
functionList.value = AllFunction;
|
||||||
checkedKeysRef.value = checkedKeys;
|
checkedKeysRef.value = checkedKeys;
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
|||||||
{ required: true, message: '确认密码必填!', trigger: 'blur' },
|
{ required: true, message: '确认密码必填!', trigger: 'blur' },
|
||||||
{
|
{
|
||||||
validator: (rule: FormItemRule, value: string, callback: Function) => {
|
validator: (rule: FormItemRule, value: string, callback: Function) => {
|
||||||
console.log('1111')
|
|
||||||
if (value !== formContent.value.newPassword) {
|
if (value !== formContent.value.newPassword) {
|
||||||
callback(new Error('两次输入的密码不一致!'));
|
callback(new Error('两次输入的密码不一致!'));
|
||||||
} else {
|
} else {
|
||||||
@@ -107,13 +106,9 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
|||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
const result = await updatePassWord(formContent.value);
|
await updatePassWord(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: String(result.data)})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
}
|
||||||
}
|
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
await props.refreshTable!()
|
await props.refreshTable!()
|
||||||
|
|||||||
@@ -133,20 +133,11 @@
|
|||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
const result = await updateUser(formContent.value);
|
await updateUser(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addUser(formContent.value);
|
await addUser(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
}
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
}
|
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
await props.refreshTable!()
|
await props.refreshTable!()
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const confirmForm = () => {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
// 将表单数据转为json,发送到后端
|
// 将表单数据转为json,发送到后端
|
||||||
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
||||||
console.log(confirmFormData)
|
|
||||||
if ('是否新增') {
|
if ('是否新增') {
|
||||||
// 执行新增接口
|
// 执行新增接口
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ const router = useRouter();
|
|||||||
const value1 = ref("");
|
const value1 = ref("");
|
||||||
const value2 = ref("");
|
const value2 = ref("");
|
||||||
const tableHeight = ref(0);
|
const tableHeight = ref(0);
|
||||||
console.log(window.innerHeight, "+++++++++");
|
//console.log(window.innerHeight, "+++++++++");
|
||||||
tableHeight.value = window.innerHeight - 630;
|
tableHeight.value = window.innerHeight - 630;
|
||||||
const deviceData = deviceDataList.plan_devicedata
|
const deviceData = deviceDataList.plan_devicedata
|
||||||
const operationShow = ref(false);
|
const operationShow = ref(false);
|
||||||
@@ -361,7 +361,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
label: '归档状态',
|
label: '归档状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 150 ,isShow: operationShow},
|
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow},
|
||||||
])
|
])
|
||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
@@ -542,8 +542,8 @@ const sortTable = ({
|
|||||||
newIndex?: number;
|
newIndex?: number;
|
||||||
oldIndex?: number;
|
oldIndex?: number;
|
||||||
}) => {
|
}) => {
|
||||||
console.log(newIndex, oldIndex);
|
//console.log(newIndex, oldIndex);
|
||||||
console.log(proTable.value?.tableData);
|
//console.log(proTable.value?.tableData);
|
||||||
ElMessage.success("修改列表排序成功");
|
ElMessage.success("修改列表排序成功");
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -589,6 +589,7 @@ const changeActiveTabs = (val: number,val2: number) => {
|
|||||||
form.value.activeChildTabs= val2;
|
form.value.activeChildTabs= val2;
|
||||||
tableHeaderInit(val)
|
tableHeaderInit(val)
|
||||||
console.log(form,val,val2,666)
|
console.log(form,val,val2,666)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//根据当前功能,初始化表头下拉框中的默认值和禁用值
|
//根据当前功能,初始化表头下拉框中的默认值和禁用值
|
||||||
@@ -728,7 +729,7 @@ const openDrawer = (title: string, row: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log(proTable.value?.tableData);
|
//console.log(proTable.value?.tableData);
|
||||||
});
|
});
|
||||||
defineExpose({ changeActiveTabs });
|
defineExpose({ changeActiveTabs });
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ watch(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
const handleNodeClick = (data) => {
|
const handleNodeClick = (data) => {
|
||||||
console.log(data)
|
// console.log(data)
|
||||||
updateSelectedTreeNode()
|
updateSelectedTreeNode()
|
||||||
}
|
}
|
||||||
const filterNode = (value: string, data) => {
|
const filterNode = (value: string, data) => {
|
||||||
@@ -78,7 +78,7 @@ const detail = () => {
|
|||||||
router.push('/plan')
|
router.push('/plan')
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log()
|
// console.log()
|
||||||
})
|
})
|
||||||
defineExpose({ getTreeData })
|
defineExpose({ getTreeData })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import model from "./tabs/model.vue";
|
|||||||
import dashboard from "./tabs/dashboard.vue";
|
import dashboard from "./tabs/dashboard.vue";
|
||||||
import { onMounted } from "vue";
|
import { onMounted } from "vue";
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
console.log(authStore.showMenuFlagGet, "????????????????33333333");
|
|
||||||
const activeIndex = ref("1-1");
|
const activeIndex = ref("1-1");
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const modeList = [
|
const modeList = [
|
||||||
@@ -74,10 +74,10 @@ const handelOpen = async (isActive: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleSelect = (key: string, keyPath: string[]) => {
|
const handleSelect = (key: string, keyPath: string[]) => {
|
||||||
console.log(key, keyPath);
|
//console.log(key, keyPath);
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log();
|
//console.log();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const tabShow= ref(false);
|
|||||||
const tabLabel1 = ref('自动检测')
|
const tabLabel1 = ref('自动检测')
|
||||||
const editableTabsValue = ref('0')
|
const editableTabsValue = ref('0')
|
||||||
const handleChange = (val: string[]) => {
|
const handleChange = (val: string[]) => {
|
||||||
console.log(val)
|
// console.log(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleTabsChange = (val) => {
|
const handleTabsChange = (val) => {
|
||||||
@@ -135,6 +135,7 @@ const handleTabsChange = (val) => {
|
|||||||
form.value.activeTabs = 3;
|
form.value.activeTabs = 3;
|
||||||
form.value.activeChildTabs = Number(val);
|
form.value.activeChildTabs = Number(val);
|
||||||
console.log(val)
|
console.log(val)
|
||||||
|
|
||||||
}
|
}
|
||||||
localStorage.setItem("color", "red");
|
localStorage.setItem("color", "red");
|
||||||
//功能选择数据
|
//功能选择数据
|
||||||
@@ -282,7 +283,7 @@ const planDetail = () => {
|
|||||||
};
|
};
|
||||||
//功能选择css切换
|
//功能选择css切换
|
||||||
const handleCheckFunction = (val: any) => {
|
const handleCheckFunction = (val: any) => {
|
||||||
console.log("test",val);
|
// console.log("test",val);
|
||||||
editableTabsValue.value = '0';
|
editableTabsValue.value = '0';
|
||||||
form.value.activeChildTabs = 0;
|
form.value.activeChildTabs = 0;
|
||||||
tabsList.value.map((item: any, index: any) => {
|
tabsList.value.map((item: any, index: any) => {
|
||||||
@@ -318,7 +319,7 @@ const handleCheckFunction = (val: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log();
|
// console.log();
|
||||||
getTree();
|
getTree();
|
||||||
getPieData();
|
getPieData();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -349,21 +349,13 @@ import { el } from 'element-plus/es/locale'
|
|||||||
{
|
{
|
||||||
formContent.value.arrivedDate = dayjs(formContent.value.arrivedDate).format('YYYY-MM-DD');
|
formContent.value.arrivedDate = dayjs(formContent.value.arrivedDate).format('YYYY-MM-DD');
|
||||||
}
|
}
|
||||||
//console.log('1111'+formContent.value.arrivedDate)
|
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
const result = await updatePqDev(formContent.value);
|
await updatePqDev(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addPqDev(formContent.value);
|
await addPqDev(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '名称',
|
||||||
search: { el: 'input',order:2,offset:0.1},
|
search: { el: 'input'},
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -74,36 +74,12 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
fieldNames: { label: 'name', value: 'code' },
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'devChns',
|
|
||||||
label: '设备通道数',
|
|
||||||
minWidth: 110,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'devVolt',
|
|
||||||
label: '额定电压(V)',
|
|
||||||
minWidth: 130,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'devCurr',
|
|
||||||
label: '额定电流(A)',
|
|
||||||
minWidth: 130,
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'manufacturer',
|
|
||||||
label: '生产厂商',
|
|
||||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
|
||||||
search: { el: 'select', props: { filterable: true }},
|
|
||||||
fieldNames: { label: 'name', value: 'code' },
|
|
||||||
minWidth: 200,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'createDate',
|
prop: 'createDate',
|
||||||
label: '生产日期',
|
label: '生产日期',
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
search: {
|
search: {
|
||||||
order:1,
|
span:2,
|
||||||
render: () => {
|
render: () => {
|
||||||
return (
|
return (
|
||||||
<div class='flx-flex-start'>
|
<div class='flx-flex-start'>
|
||||||
@@ -117,6 +93,38 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'devChns',
|
||||||
|
label: '设备通道数',
|
||||||
|
minWidth: 110,
|
||||||
|
render: scope => {
|
||||||
|
return String(scope.row.devChns) // 将数字转换为字符串
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'devVolt',
|
||||||
|
label: '额定电压(V)',
|
||||||
|
minWidth: 130,
|
||||||
|
render: scope => {
|
||||||
|
return String(scope.row.devVolt) // 将数字转换为字符串
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'devCurr',
|
||||||
|
label: '额定电流(A)',
|
||||||
|
minWidth: 130,
|
||||||
|
render: scope => {
|
||||||
|
return String(scope.row.devCurr) // 将数字转换为字符串
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'manufacturer',
|
||||||
|
label: '生产厂商',
|
||||||
|
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||||
|
search: { el: 'select', props: { filterable: true },order:1},
|
||||||
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
|
minWidth: 200,
|
||||||
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -127,13 +135,10 @@ const endDate = ref('')
|
|||||||
const handleDateChange = (startDateTemp: string, endDateTemp: string) => {
|
const handleDateChange = (startDateTemp: string, endDateTemp: string) => {
|
||||||
startDate.value = startDateTemp
|
startDate.value = startDateTemp
|
||||||
endDate.value = endDateTemp
|
endDate.value = endDateTemp
|
||||||
//console.log(startDateTemp)
|
|
||||||
//console.log(endDateTemp)
|
|
||||||
}
|
}
|
||||||
// 打开 drawer(新增、编辑)
|
// 打开 drawer(新增、编辑)
|
||||||
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
||||||
devicePopup.value?.open(titleType, row)
|
devicePopup.value?.open(titleType, row)
|
||||||
console.log(columns)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量删除设备
|
// 批量删除设备
|
||||||
@@ -150,9 +155,16 @@ const handleDelete = async (params: Device.ResPqDev) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 导出设备
|
// 导出设备
|
||||||
const downloadFile = async () => {
|
const downloadFile = async (params: Device.ReqPqDevParams) => {
|
||||||
|
// 获取当前的搜索参数
|
||||||
|
const searchParam = proTable.value?.searchParam || {};
|
||||||
|
|
||||||
|
// 将开始时间和结束时间添加到搜索参数中
|
||||||
|
searchParam.searchBeginTime = startDate.value;
|
||||||
|
searchParam.searchEndTime = endDate.value;
|
||||||
|
|
||||||
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>
|
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>
|
||||||
useDownload(exportPqDev, '被检设备导出数据', proTable.value?.searchParam, false,'.xlsx'),
|
useDownload(exportPqDev,'被检设备导出数据', proTable.value?.searchParam, false,'.xlsx'),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ const typeList = [
|
|||||||
{
|
{
|
||||||
// 将表单数据转为json,发送到后端
|
// 将表单数据转为json,发送到后端
|
||||||
let confirmFormData = JSON.parse(JSON.stringify(props.formData));
|
let confirmFormData = JSON.parse(JSON.stringify(props.formData));
|
||||||
console.log(confirmFormData)
|
// console.log(confirmFormData)
|
||||||
emit('submit', props.formData); // 提交表单数据
|
emit('submit', props.formData); // 提交表单数据
|
||||||
emit('update:visible', false); // 提交后关闭对话框
|
emit('update:visible', false); // 提交后关闭对话框
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
|||||||
search: { el: 'select', props: { filterable: true } },
|
search: { el: 'select', props: { filterable: true } },
|
||||||
fieldNames: { label: 'label', value: 'code' },
|
fieldNames: { label: 'label', value: 'code' },
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 300,},
|
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 250,},
|
||||||
])
|
])
|
||||||
|
|
||||||
// 打开编辑对话框
|
// 打开编辑对话框
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- 表格操作 -->
|
<!-- 表格操作 -->
|
||||||
<template #operation='scope'>
|
<template #operation='scope'>
|
||||||
<el-button type='primary' link :icon='View' >查看</el-button>
|
|
||||||
<el-button type='primary' link :icon='EditPen' >编辑</el-button>
|
<el-button type='primary' link :icon='EditPen' >编辑</el-button>
|
||||||
<el-button type='primary' link :icon='Delete' >删除</el-button>
|
<el-button type='primary' link :icon='Delete' >删除</el-button>
|
||||||
<el-button type='primary' :model-value="false" link :icon='Upload' >升级为模板</el-button>
|
<el-button type='primary' :model-value="false" link :icon='Upload' >升级为模板</el-button>
|
||||||
@@ -114,7 +113,7 @@ const columns = reactive<ColumnProps<TestScript.TestScriptBO>[]>([
|
|||||||
search: { el: 'select' },
|
search: { el: 'select' },
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 330 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 250 },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
search: { el: 'select' },
|
search: { el: 'select' },
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 330 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 250 },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
class="custom-tree-node"
|
class="custom-tree-node"
|
||||||
style="display: flex; align-items: center"
|
style="display: flex; align-items: center"
|
||||||
>
|
>
|
||||||
|
|
||||||
<CircleCheck v-if="data.isChildNode && data.scriptIdx < currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#67C23A;"/>
|
<CircleCheck v-if="data.isChildNode && data.scriptIdx < currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#67C23A;"/>
|
||||||
<svg-icon name="wind" spin></svg-icon>
|
|
||||||
<Loading v-if="data.isChildNode && data.scriptIdx === currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#E6A23C;"/>
|
<svg-icon v-if="data.isChildNode && data.scriptIdx === currentIndex" name="loading" spin ></svg-icon>
|
||||||
<span>{{ node.label }}</span>
|
<span>{{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,7 +72,7 @@ const timer = setInterval(() => {
|
|||||||
currentIndex.value++;
|
currentIndex.value++;
|
||||||
if (currentIndex.value > 14)
|
if (currentIndex.value > 14)
|
||||||
currentIndex.value = 0;
|
currentIndex.value = 0;
|
||||||
console.log(currentIndex.value);
|
// console.log(currentIndex.value);
|
||||||
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
@@ -88,7 +87,7 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
const changeSelect=()=>{
|
const changeSelect=()=>{
|
||||||
console.log(treeRef.value.getCheckedKeys());
|
//console.log(treeRef.value.getCheckedKeys());
|
||||||
}
|
}
|
||||||
const handleNodeClick = (data) => {
|
const handleNodeClick = (data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:label="item.name"
|
:label="item.name"
|
||||||
></el-checkbox
|
></el-checkbox
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button type="primary" @click="handlePreTest">预检测</el-button>
|
<el-button type="primary" @click="handlePreTest">预检测</el-button>
|
||||||
<el-button type="primary" @click="handleAutoTest">正式检测</el-button>
|
<el-button type="primary" @click="handleAutoTest">正式检测</el-button>
|
||||||
<el-button type="primary" @click="handleBackDeviceList"
|
<el-button type="primary" @click="handleBackDeviceList"
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
label: '归档状态',
|
label: '归档状态',
|
||||||
minWidth: 110,
|
minWidth: 110,
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 150 },
|
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 100 },
|
||||||
])
|
])
|
||||||
|
|
||||||
const open = (textTitle: string) => {
|
const open = (textTitle: string) => {
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
|||||||
{
|
{
|
||||||
// 将表单数据转为json,发送到后端
|
// 将表单数据转为json,发送到后端
|
||||||
let confirmFormData = JSON.parse(JSON.stringify(props.formData));
|
let confirmFormData = JSON.parse(JSON.stringify(props.formData));
|
||||||
console.log(confirmFormData)
|
//console.log(confirmFormData)
|
||||||
emit('submit', props.formData); // 提交表单数据
|
emit('submit', props.formData); // 提交表单数据
|
||||||
emit('update:visible', false); // 提交后关闭对话框
|
emit('update:visible', false); // 提交后关闭对话框
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
search: { el: 'select' },
|
search: { el: 'select' },
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 150 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 100 },
|
||||||
])
|
])
|
||||||
|
|
||||||
const open = (textTitle: string) => {
|
const open = (textTitle: string) => {
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ function handleFiles(event: Event) {
|
|||||||
const files = target.files
|
const files = target.files
|
||||||
if (files && files.length > 0) {
|
if (files && files.length > 0) {
|
||||||
// 处理文件
|
// 处理文件
|
||||||
console.log(files)
|
// console.log(files)
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'导入的数据与当前数据有冲突,请选择以哪个数据为主进行覆盖',
|
'导入的数据与当前数据有冲突,请选择以哪个数据为主进行覆盖',
|
||||||
'数据冲突',
|
'数据冲突',
|
||||||
@@ -366,7 +366,7 @@ const combineClick = () => {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
console.log(`合并后的计划名为:`, value)
|
// console.log(`合并后的计划名为:`, value)
|
||||||
proTable.value?.clearSelection()
|
proTable.value?.clearSelection()
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ onBeforeUnmount(() => {
|
|||||||
handleEnter();
|
handleEnter();
|
||||||
});
|
});
|
||||||
const dataSource = computed(() => {
|
const dataSource = computed(() => {
|
||||||
console.log("dataSource", dataSource);
|
//console.log("dataSource", dataSource);
|
||||||
return props.dataSource;
|
return props.dataSource;
|
||||||
});
|
});
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const activities = [
|
|||||||
const data = ref([]);
|
const data = ref([]);
|
||||||
const open = (list: any) => {
|
const open = (list: any) => {
|
||||||
data.value = list;
|
data.value = list;
|
||||||
console.log(data.value, "99999999");
|
// console.log(data.value, "99999999");
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -408,8 +408,8 @@ const sortTable = ({
|
|||||||
newIndex?: number;
|
newIndex?: number;
|
||||||
oldIndex?: number;
|
oldIndex?: number;
|
||||||
}) => {
|
}) => {
|
||||||
console.log(newIndex, oldIndex);
|
// console.log(newIndex, oldIndex);
|
||||||
console.log(proTable.value?.tableData);
|
//console.log(proTable.value?.tableData);
|
||||||
ElMessage.success("修改列表排序成功");
|
ElMessage.success("修改列表排序成功");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" :label-width="100">
|
<el-form-item label="排序" :label-width="100">
|
||||||
<el-input-number v-model="formContent.sort"/>
|
<el-input-number v-model="formContent.sort" :min='1' :max='999'/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,14 +41,12 @@
|
|||||||
import {dialogSmall} from "@/utils/elementBind";
|
import {dialogSmall} from "@/utils/elementBind";
|
||||||
import {addDictData, updateDictData} from "@/api/system/dictionary/dictData";
|
import {addDictData, updateDictData} from "@/api/system/dictionary/dictData";
|
||||||
import {Dict} from "@/api/system/dictionary/interface";
|
import {Dict} from "@/api/system/dictionary/interface";
|
||||||
import {FormItemRule} from "element-plus";
|
import {ElMessage, FormItemRule} from "element-plus";
|
||||||
import type {Ref} from "vue";
|
import type {Ref} from "vue";
|
||||||
|
|
||||||
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||||
name: [{required: true, message: '类型名称必填!', trigger: 'blur'}],
|
name: [{required: true, message: '类型名称必填!', trigger: 'blur'}],
|
||||||
code: [{required: true, message: '类型编码必填!', trigger: 'blur'}],
|
code: [{required: true, message: '类型编码必填!', trigger: 'blur'}],
|
||||||
dictValue: [{required: true, message: '类型值必填!', trigger: 'blur'}],
|
|
||||||
level: [{required: true, message: '事件等级必填!', trigger: 'blur'}],
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const dialogFormRef = ref()
|
const dialogFormRef = ref()
|
||||||
@@ -115,7 +113,6 @@ const save = () => {
|
|||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
formContent.value.value = formContent.value.dictValue
|
formContent.value.value = formContent.value.dictValue
|
||||||
console.log(formContent.value)
|
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
await updateDictData(formContent.value)
|
await updateDictData(formContent.value)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='排序' :label-width='140'>
|
<el-form-item label='排序' :label-width='140'>
|
||||||
<el-input-number v-model='formContent.sort' :min="0" controls-position="right" style="width: 300px;"/>
|
<el-input-number v-model='formContent.sort' :min='1' :max='999' />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-divider >拓展数据</el-divider>
|
<el-divider >拓展数据</el-divider>
|
||||||
<el-form-item label='参数缺省值' :label-width='140' prop='defaultValue'>
|
<el-form-item label='参数缺省值' :label-width='140' prop='defaultValue'>
|
||||||
@@ -229,12 +229,10 @@
|
|||||||
formContent.value.statMethod = selectedStatMethods.value.join(',')
|
formContent.value.statMethod = selectedStatMethods.value.join(',')
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
await updateDictPq(formContent.value);
|
await updateDictPq(formContent.value);
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addDictPq(formContent.value);
|
await addDictPq(formContent.value);
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
|
||||||
}
|
}
|
||||||
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
await props.refreshTable!()
|
await props.refreshTable!()
|
||||||
|
|||||||
@@ -117,17 +117,16 @@ const columns = reactive<ColumnProps<Dict.ResDictPq>[]>([
|
|||||||
const codeString = Array.isArray(codes) ? codes.join(',') : codes
|
const codeString = Array.isArray(codes) ? codes.join(',') : codes
|
||||||
const codeArray = codeString.split(',')
|
const codeArray = codeString.split(',')
|
||||||
if (codeArray.length > 1) {
|
if (codeArray.length > 1) {
|
||||||
console.log('多个 code', codeString)
|
|
||||||
// 查找与每个 code 值匹配的 name,然后拼接成逗号分割的字符串
|
// 查找与每个 code 值匹配的 name,然后拼接成逗号分割的字符串
|
||||||
const names = codeArray.map(code => {
|
const names = codeArray.map(code => {
|
||||||
const dictItem = dictStore.getDictData('Stat_Method').find(item => item.code === code)
|
const dictItem = dictStore.getDictData('Stat_Method').find(item => item.code === code)
|
||||||
return dictItem ? dictItem.name : '' // 如果找到匹配的项,返回对应的 name
|
return dictItem ? dictItem.code : '/' // 如果找到匹配的项,返回对应的 code
|
||||||
})
|
})
|
||||||
return names.join(', ') // 用逗号连接所有的 name
|
return names.join(', ') // 用逗号连接所有的 name
|
||||||
}
|
}
|
||||||
// 查找单个 code 对应的 name
|
// 查找单个 code 对应的 name
|
||||||
const dictItem = dictStore.getDictData('Stat_Method').find(item => item.code === codeArray[0])
|
const dictItem = dictStore.getDictData('Stat_Method').find(item => item.code === codeArray[0])
|
||||||
return dictItem ? dictItem.name : '' // 如果找到匹配的项,返回对应的 name
|
return dictItem ? dictItem.code : '/' // 如果找到匹配的项,返回对应的 code
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -145,6 +144,14 @@ const columns = reactive<ColumnProps<Dict.ResDictPq>[]>([
|
|||||||
enum: dictStore.getDictData('Data_Day'),
|
enum: dictStore.getDictData('Data_Day'),
|
||||||
fieldNames: { label: 'name', value: 'code' }
|
fieldNames: { label: 'name', value: 'code' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'sort',
|
||||||
|
label: '排序',
|
||||||
|
width:70,
|
||||||
|
render: scope => {
|
||||||
|
return String(scope.row.sort) // 将数字转换为字符串
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'operation',
|
prop: 'operation',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<el-form-item label='字典名称' :label-width='100' prop='name'>
|
<el-form-item label='字典名称' :label-width='100' prop='name'>
|
||||||
<el-input v-model='formContent.name' placeholder='请输入字典名称' autocomplete='off' />
|
<el-input v-model='formContent.name' placeholder='请输入字典名称' autocomplete='off' />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='序号' :label-width='100'>
|
<el-form-item label='排序' :label-width='100'>
|
||||||
<el-input-number v-model='formContent.sort' :min="0" controls-position="right" style="width: 300px;"/>
|
<el-input-number v-model='formContent.sort' :min='1' :max='999' />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='编码' :label-width='100' prop='code'>
|
<el-form-item label='编码' :label-width='100' prop='code'>
|
||||||
<el-input v-model='formContent.code' placeholder='请输入字典编码' autocomplete='off' />
|
<el-input v-model='formContent.code' placeholder='请输入字典编码' autocomplete='off' />
|
||||||
@@ -95,23 +95,15 @@
|
|||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
let result: ResultData<unknown>;
|
let result: ResultData<unknown>;
|
||||||
if( titleType.value == 'add'){
|
if( titleType.value == 'add'){
|
||||||
result = await addDictTree(formContent.value);
|
await addDictTree(formContent.value);
|
||||||
}else{
|
}else{
|
||||||
result = await updateDictTree(formContent.value);
|
await updateDictTree(formContent.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addDictTree(formContent.value);
|
await addDictTree(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
|
||||||
ElMessage.error({ message: result.message})
|
|
||||||
}else{
|
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
|
|||||||
@@ -39,25 +39,32 @@
|
|||||||
const treePopup = ref()
|
const treePopup = ref()
|
||||||
|
|
||||||
const columns = reactive<ColumnProps<Dict.ResDictTree>[]>([
|
const columns = reactive<ColumnProps<Dict.ResDictTree>[]>([
|
||||||
|
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '字典名称',
|
label: '字典名称',
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '编码',
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
label: '描述',
|
label: '描述',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sort',
|
||||||
|
label: '排序',
|
||||||
|
width:70,
|
||||||
|
render: scope => {
|
||||||
|
return String(scope.row.sort) // 将数字转换为字符串
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'state',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
minWidth:30,
|
minWidth:30,
|
||||||
|
isShow:false,
|
||||||
enum: dictStore.getDictData('state'),
|
enum: dictStore.getDictData('state'),
|
||||||
fieldNames: { label: 'label', value: 'code' },
|
fieldNames: { label: 'label', value: 'code' },
|
||||||
render: scope => {
|
render: scope => {
|
||||||
@@ -65,6 +72,7 @@
|
|||||||
<el-tag type={scope.row.state === 0 ? 'success' : (scope.row.state === 1 ? 'warning' : 'danger')}>
|
<el-tag type={scope.row.state === 0 ? 'success' : (scope.row.state === 1 ? 'warning' : 'danger')}>
|
||||||
{scope.row.state === 0 ? '正常' : (scope.row.state === 1 ? '停用' : '删除')}
|
{scope.row.state === 0 ? '正常' : (scope.row.state === 1 ? '停用' : '删除')}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -72,7 +80,8 @@
|
|||||||
prop: 'operation',
|
prop: 'operation',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 250,
|
width:250,
|
||||||
|
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -84,7 +93,6 @@
|
|||||||
|
|
||||||
// 删除字典类型
|
// 删除字典类型
|
||||||
const handleDelete = async (params: Dict.ResDictTree) => {
|
const handleDelete = async (params: Dict.ResDictTree) => {
|
||||||
console.log(params)
|
|
||||||
await useHandleData(deleteDictTree, params, `删除【${params.name}】树形字典类型`)
|
await useHandleData(deleteDictTree, params, `删除【${params.name}】树形字典类型`)
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='排序' :label-width='100'>
|
<el-form-item label='排序' :label-width='100'>
|
||||||
<el-input-number v-model='formContent.sort' />
|
<el-input-number v-model='formContent.sort' :min='1' :max='999'/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='备注' :label-width='100'>
|
<el-form-item label='备注' :label-width='100'>
|
||||||
<el-input v-model='formContent.remark' placeholder='请输入备注' autocomplete='off' :rows='2'
|
<el-input v-model='formContent.remark' placeholder='请输入备注' autocomplete='off' :rows='2'
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ const columns = reactive<ColumnProps<Dict.ResDictType>[]>([
|
|||||||
prop: 'sort',
|
prop: 'sort',
|
||||||
label: '排序',
|
label: '排序',
|
||||||
minWidth: 70,
|
minWidth: 70,
|
||||||
|
render: scope => {
|
||||||
|
return String(scope.row.sort) // 将数字转换为字符串
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
@@ -79,7 +82,7 @@ const columns = reactive<ColumnProps<Dict.ResDictType>[]>([
|
|||||||
prop: 'operation',
|
prop: 'operation',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
minWidth: 250,
|
width: 250,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user