微调
This commit is contained in:
@@ -19,6 +19,6 @@ VITE_API_URL=/api
|
||||
|
||||
# 开发环境跨域代理,支持配置多个
|
||||
|
||||
VITE_PROXY=[["/api","http://192.168.1.121:18092/"]]
|
||||
VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
|
||||
#VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
||||
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
||||
|
||||
@@ -46,7 +46,6 @@ router.beforeEach(async (to, from, next) => {
|
||||
const authStore = useAuthStore()
|
||||
// 1.NProgress 开始
|
||||
NProgress.start()
|
||||
console.log('11111111111111');
|
||||
// 2.动态设置标题
|
||||
const title = import.meta.env.VITE_GLOB_APP_TITLE
|
||||
document.title = to.meta.title ? `${to.meta.title} - ${title}` : title
|
||||
|
||||
@@ -241,17 +241,17 @@ watch(webMsgSend,function (newValue,oldValue){
|
||||
item.devName === newValue.data.devName);
|
||||
if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在
|
||||
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);
|
||||
firstCoefficientVO.aVuXi = parseFloat(newValue.data.aVuXi).toFixed(4);
|
||||
firstCoefficientVO.aVuXi = parseFloat((newValue.data.aVuXi / 10000).toFixed(4)).toString();
|
||||
firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4);
|
||||
firstCoefficientVO.bVuXi = parseFloat(newValue.data.bVuXi).toFixed(4);
|
||||
firstCoefficientVO.bVuXi = parseFloat((newValue.data.bVuXi / 10000).toFixed(4)).toString();
|
||||
firstCoefficientVO.cVuData = parseFloat(newValue.data.cVuData).toFixed(4);
|
||||
firstCoefficientVO.cVuXi = parseFloat(newValue.data.cVuXi).toFixed(4);
|
||||
firstCoefficientVO.cVuXi = parseFloat((newValue.data.cVuXi / 10000).toFixed(4)).toString();
|
||||
firstCoefficientVO.aIeData = parseFloat(newValue.data.aIeData).toFixed(4);
|
||||
firstCoefficientVO.aIeXi = parseFloat(newValue.data.aIeXi).toFixed(4);
|
||||
firstCoefficientVO.aIeXi = parseFloat((newValue.data.aVuXi / 10000).toFixed(4)).toString();
|
||||
firstCoefficientVO.bIeData = parseFloat(newValue.data.bIeData).toFixed(4);
|
||||
firstCoefficientVO.bIeXi = parseFloat(newValue.data.bIeXi).toFixed(4);
|
||||
firstCoefficientVO.bIeXi = parseFloat((newValue.data.bVuXi / 10000).toFixed(4)).toString();
|
||||
firstCoefficientVO.cIeData = parseFloat(newValue.data.cIeData).toFixed(4);
|
||||
firstCoefficientVO.cIeXi = parseFloat(newValue.data.cIeXi).toFixed(4);
|
||||
firstCoefficientVO.cIeXi = parseFloat((newValue.data.cVuXi / 10000).toFixed(4)).toString();
|
||||
//console.log(newValue.data.devName + '对象:', firstCoefficientVO);
|
||||
activeIndex.value++;
|
||||
} else {
|
||||
|
||||
@@ -451,6 +451,13 @@ const getTableList = async (params: any) => {
|
||||
'reportState': form.value.checkReportStatus,
|
||||
'name':form.value.search
|
||||
});
|
||||
}else{//点击树根节点,表格显示无数据
|
||||
return getBoundPqDevList({'planId': '',
|
||||
'checkStateList': [0],
|
||||
'checkResult': form.value.checkResult,
|
||||
'reportState': form.value.checkReportStatus,
|
||||
'name':form.value.search
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -579,9 +586,6 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow},
|
||||
])
|
||||
|
||||
|
||||
|
||||
// 跳转详情页
|
||||
const toDetail = () => {
|
||||
router.push(
|
||||
@@ -1025,7 +1029,6 @@ const handleTest = async (val:string) => {
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 打开 drawer(新增、查看、编辑)
|
||||
const openDrawer = async (title: string, row: any) => {
|
||||
if (title === '查看')
|
||||
@@ -1109,9 +1112,6 @@ onBeforeMount(async () => {
|
||||
}))
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
const handleQuitClicked = () => {
|
||||
emit('batchGenerateClicked'); // 触发事件
|
||||
};
|
||||
|
||||
@@ -202,10 +202,6 @@ const tableRef2 = ref()
|
||||
const currentId = ref('')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {
|
||||
@@ -271,7 +267,6 @@ const findPlanById = (plans: Plan.ReqPlan[], id: string): Plan.ReqPlan | undefin
|
||||
|
||||
const getPieData = async (id: string) => {
|
||||
currentId.value = id // 设置当前ID
|
||||
|
||||
// 初始化计数对象
|
||||
const checkStateCount: { [key: number]: number } = { 0: 0, 1: 0, 2: 0, 3: 0 }
|
||||
const checkResultCount: { [key: number]: number } = { 0: 0, 1: 0, 2: 0 }
|
||||
@@ -306,6 +301,10 @@ const getPieData = async (id: string) => {
|
||||
reportStateCount[t.reportState]++
|
||||
}
|
||||
})
|
||||
|
||||
}else{
|
||||
|
||||
planName.value = '所选计划:'
|
||||
}
|
||||
|
||||
// 检查 checkStateCount 是否全为 0
|
||||
@@ -339,6 +338,7 @@ chartsData3.value = [
|
||||
pieRef3.value.init()
|
||||
}
|
||||
const getTree = (data?: any) => {
|
||||
|
||||
treeRef.value.getTreeData(data)
|
||||
}
|
||||
//前往检测
|
||||
@@ -434,9 +434,18 @@ onBeforeMount(async () => {
|
||||
}
|
||||
planList.value = (await getPlanListByPattern(reqPlan)) as ResultData<Plan.ReqPlan[]>
|
||||
|
||||
if (planList.value.data[0].children[0]) {
|
||||
currentId.value = planList.value.data[0].children[0].id
|
||||
for (let i = 0; i < planList.value.data.length; i++) {
|
||||
if (Array.isArray(planList.value.data[i].children) && planList.value.data[i].children.length > 0) {
|
||||
currentId.value = planList.value.data[i].children[0].id; // 直接赋值第一个 children 的 id
|
||||
break; // 确保只执行一次
|
||||
}
|
||||
}
|
||||
|
||||
// if (planList.value.data[0].children[0]) {
|
||||
// currentId.value = planList.value.data[0].children[0].id
|
||||
// console.log('currentId.value',planList.value.data[0])
|
||||
// }
|
||||
|
||||
if (chartsInfoRef.value) {
|
||||
resizeObserver.observe(chartsInfoRef.value)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="createDate" >
|
||||
<el-form-item label="出厂日期" prop="createDate" v-if="scene === '0'">
|
||||
<el-date-picker
|
||||
v-model="formContent.createDate"
|
||||
placeholder="请选择出厂日期"
|
||||
@@ -281,17 +281,21 @@ const baseRules: Record<string, Array<FormItemRule>> = {
|
||||
const rules = computed(() => {
|
||||
const dynamicRules = { ...baseRules };
|
||||
|
||||
if (scene.value === '0'){//只有电科院需要展示
|
||||
dynamicRules.createDate= [{ required: true, message: '出厂日期必填!', trigger: 'blur' }];
|
||||
}
|
||||
if (scene.value !== '0') {
|
||||
dynamicRules.name = [{ required: true, message: '设备名称必填!', trigger: 'blur' }];
|
||||
dynamicRules.hardwareVersion = [{ required: true, message: '固件版本必填!', trigger: 'blur' }];
|
||||
dynamicRules.softwareVersion = [{ required: true, message: '软件版本必填!', trigger: 'blur' }];
|
||||
dynamicRules.manufacturer = [{ required: true, message: '生产厂家必选!', trigger: 'change' }];
|
||||
|
||||
}
|
||||
|
||||
if (scene.value !== '2') {
|
||||
dynamicRules.name = [{ required: true, message: '设备名称必填!', trigger: 'blur' }];
|
||||
dynamicRules.manufacturer = [{ required: true, message: '生产厂家必选!', trigger: 'change' }];
|
||||
dynamicRules.createDate= [{ required: true, message: '出厂日期必填!', trigger: 'blur' }];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -94,8 +94,9 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
prop: 'createDate',
|
||||
label: '出厂日期',
|
||||
minWidth: 200,
|
||||
isShow: appSceneStore.currentScene === '0',
|
||||
...(appSceneStore.currentScene === '0' ? {
|
||||
search: {
|
||||
span: 2,
|
||||
render: () => {
|
||||
return (
|
||||
<div class='flx-flex-start'>
|
||||
@@ -107,6 +108,20 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
)
|
||||
},
|
||||
},
|
||||
} : {}),
|
||||
// search: {
|
||||
// span: 2,
|
||||
// render: () => {
|
||||
// return (
|
||||
// <div class='flx-flex-start'>
|
||||
// <TimeControl
|
||||
// default={'月'}
|
||||
// onUpdate-dates={handleDateChange}
|
||||
// />
|
||||
// </div>
|
||||
// )
|
||||
// },
|
||||
// },
|
||||
},
|
||||
{
|
||||
prop: 'devChns',
|
||||
|
||||
Reference in New Issue
Block a user