微调
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import type {ReqPage, ResPage} from '@/api/interface'
|
import type { ReqPage, ResPage } from '@/api/interface'
|
||||||
|
|
||||||
// 标准设备模块
|
// 标准设备模块
|
||||||
export namespace StandardDevice {
|
export namespace StandardDevice {
|
||||||
@@ -34,6 +34,7 @@ export namespace StandardDevice {
|
|||||||
createTime?: string | null; //创建时间
|
createTime?: string | null; //创建时间
|
||||||
updateBy?: string | null; //更新用户
|
updateBy?: string | null; //更新用户
|
||||||
updateTime?: string | null; //更新时间
|
updateTime?: string | null; //更新时间
|
||||||
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ const handleImportResponse = (res: any) => {
|
|||||||
if (!parameter.value.progressBar) {
|
if (!parameter.value.progressBar) {
|
||||||
if (res.code === 'A0000') {
|
if (res.code === 'A0000') {
|
||||||
ElMessage.success('导入成功')
|
ElMessage.success('导入成功')
|
||||||
|
emit('result', true)
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
emit('result', res.data)
|
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.message)
|
ElMessage.error(res.message)
|
||||||
fileDisabled.value = false
|
fileDisabled.value = false
|
||||||
@@ -195,8 +195,8 @@ const initSSE = () => {
|
|||||||
progressData.value.status = 'success'
|
progressData.value.status = 'success'
|
||||||
eventSource.value!.close()
|
eventSource.value!.close()
|
||||||
ElMessage.success('导入成功')
|
ElMessage.success('导入成功')
|
||||||
dialogVisible.value = false
|
|
||||||
emit('result', true)
|
emit('result', true)
|
||||||
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -226,184 +226,161 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
}
|
}
|
||||||
switch (newValue.requestId) {
|
switch (newValue.requestId) {
|
||||||
case 'yjc_sbtxjy':
|
case 'yjc_sbtxjy':
|
||||||
switch (newValue.operateCode) {
|
if (newValue.code == 10200) {
|
||||||
case 'INIT_GATHER$02':
|
step1InitLog.value.push({
|
||||||
if (newValue.code == 10200) {
|
type: 'info',
|
||||||
step1InitLog.value.push({
|
log: newValue.data,
|
||||||
type: 'info',
|
})
|
||||||
log: newValue.data,
|
}
|
||||||
})
|
if (newValue.code == 10201) {
|
||||||
|
step1.value = 'process'
|
||||||
} else if (newValue.code == 10201) {
|
step1InitLog.value = [{
|
||||||
step1.value = 'process'
|
type: 'wait',
|
||||||
step1InitLog.value = [{
|
log: '正在进行设备通讯校验.....',
|
||||||
type: 'wait',
|
}];
|
||||||
log: '正在进行设备通讯校验.....',
|
}
|
||||||
}];
|
if (newValue.code == 10551) {
|
||||||
} else if (newValue.code == 10551) {
|
step1InitLog.value.push({
|
||||||
step1InitLog.value.push({
|
type: 'error',
|
||||||
type: 'error',
|
log: newValue.data + '设备触发报告异常!',
|
||||||
log: newValue.data + '设备触发报告异常!',
|
})
|
||||||
})
|
step1.value = 'error'
|
||||||
step1.value = 'error'
|
ts.value = 'error'
|
||||||
ts.value = 'error'
|
step5.value = 'error'
|
||||||
step5.value = 'error'
|
}
|
||||||
} else if (newValue.code == 10552) {
|
if (newValue.code == 10552) {
|
||||||
step1InitLog.value = [{
|
step1InitLog.value = [{
|
||||||
type: 'error',
|
type: 'error',
|
||||||
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
log: '存在已经初始化步骤,执行自动关闭,请重新发起检测!',
|
||||||
}];
|
}];
|
||||||
step1.value = 'error'
|
step1.value = 'error'
|
||||||
ts.value = 'error'
|
ts.value = 'error'
|
||||||
step5.value = 'error'
|
step5.value = 'error'
|
||||||
} else if (newValue.code == 25001) {
|
}
|
||||||
activeIndex.value = 1
|
if (newValue.code == 25001) {
|
||||||
step1.value = 'success'
|
step1InitLog.value.push({
|
||||||
step2.value = 'process'
|
type: 'info',
|
||||||
}
|
log: newValue.data,
|
||||||
break;
|
})
|
||||||
case 'INIT_GATHER$03':
|
activeIndex.value = 1
|
||||||
if (newValue.code == 10200) {
|
step1.value = 'success'
|
||||||
step1InitLog.value.push({
|
step2.value = 'process'
|
||||||
type: 'info',
|
|
||||||
log: newValue.data,
|
|
||||||
})
|
|
||||||
}else if (newValue.code == 25001) {
|
|
||||||
step1InitLog.value.push({
|
|
||||||
type: 'info',
|
|
||||||
log: newValue.data,
|
|
||||||
})
|
|
||||||
activeIndex.value = 1
|
|
||||||
step1.value = 'success'
|
|
||||||
step2.value = 'process'
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'DATA_REQUEST$03':
|
|
||||||
if (newValue.code == 25001) {
|
|
||||||
activeIndex.value = 1
|
|
||||||
step1.value = 'success'
|
|
||||||
step2.value = 'process'
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'record_wave_step1':
|
case 'record_wave_step1':
|
||||||
switch (newValue.operateCode) {
|
if (newValue.code == 25002) { //某一路录波校验失败
|
||||||
case 'DATA_REQUEST$03':
|
step1InitLog.value.push({
|
||||||
if (newValue.code == 25002) { //某一路录波校验失败
|
type: 'error',
|
||||||
step1InitLog.value.push({
|
log: newValue.data,
|
||||||
type: 'error',
|
})
|
||||||
log: newValue.data ,
|
} else if (newValue.code == 25003) { //最终失败
|
||||||
})
|
step1.value = 'error'
|
||||||
}else if (newValue.code == 25003) { //最终失败
|
ts.value = 'error'
|
||||||
step1.value = 'error'
|
step5.value = 'error'
|
||||||
ts.value = 'error'
|
|
||||||
step5.value = 'error'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'yjc_mxyzxjy':
|
case 'yjc_mxyzxjy':
|
||||||
switch (newValue.operateCode){
|
if (newValue.code == 10200) { //单个监测点成功
|
||||||
case 'DATA_REQUEST$02':
|
step2InitLog.value.push({
|
||||||
if (newValue.code == 10200) { //单个监测点成功
|
type: 'info',
|
||||||
step2InitLog.value.push({
|
log: newValue.data + '模型一致性检验成功!',
|
||||||
type: 'info',
|
})
|
||||||
log: newValue.data + '模型一致性检验成功!',
|
|
||||||
})
|
|
||||||
}else if (newValue.code == 10201) {
|
|
||||||
step2.value = 'process'
|
|
||||||
step2InitLog.value = [{
|
|
||||||
type: 'wait',
|
|
||||||
log: '正在进行模型一致性校验.....',
|
|
||||||
}];
|
|
||||||
} else if (newValue.code == 25002) { //单个监测点失败
|
|
||||||
step2InitLog.value.push({
|
|
||||||
type: 'error',
|
|
||||||
log: newValue.data +'模型一致性检验失败!',
|
|
||||||
})
|
|
||||||
}else if (newValue.code == 25001) { //最终成功
|
|
||||||
step2.value = 'success'
|
|
||||||
step3.value = 'process'
|
|
||||||
activeIndex.value = 2
|
|
||||||
}else if (newValue.code == 25003) { //最终失败
|
|
||||||
step2.value = 'error'
|
|
||||||
ts.value = 'error'
|
|
||||||
step5.value = 'error'
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
if (newValue.code == 10201) {
|
||||||
|
step2.value = 'process'
|
||||||
|
step2InitLog.value = [{
|
||||||
|
type: 'wait',
|
||||||
|
log: '正在进行模型一致性校验.....',
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
if (newValue.code == 25002) { //单个监测点失败
|
||||||
|
step2InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data + '模型一致性检验失败!',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (newValue.code == 25001) { //最终成功
|
||||||
|
step2.value = 'success'
|
||||||
|
step3.value = 'process'
|
||||||
|
activeIndex.value = 2
|
||||||
|
}
|
||||||
|
if (newValue.code == 25003) { //最终失败
|
||||||
|
step2.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'yjc_align':
|
case 'yjc_align':
|
||||||
switch (newValue.operateCode){
|
if (newValue.code == 10200) { //单个监测点成功
|
||||||
case 'DATA_REQUEST$02':
|
step3InitLog.value.push({
|
||||||
if (newValue.code == 10200) { //单个监测点成功
|
type: 'info',
|
||||||
step3InitLog.value.push({
|
log: newValue.data + '数据对齐检验成功!',
|
||||||
type: 'info',
|
})
|
||||||
log: newValue.data +'实时数据对齐检验成功!',
|
|
||||||
})
|
|
||||||
}else if (newValue.code == 10201) {
|
|
||||||
step3.value = 'process'
|
|
||||||
step3InitLog.value = [{
|
|
||||||
type: 'wait',
|
|
||||||
log: '正在进行实时数据对齐检验.....',
|
|
||||||
}];
|
|
||||||
}else if (newValue.code == 25002) { //单个监测点失败
|
|
||||||
|
|
||||||
step3InitLog.value.push({
|
|
||||||
type: 'error',
|
|
||||||
log: newValue.data + '实时数据对齐检验失败!',
|
|
||||||
})
|
|
||||||
}else if (newValue.code == 25001 && newValue.data) { //最终成功
|
|
||||||
isShowDialog.value = true
|
|
||||||
step3.value = 'success'
|
|
||||||
step4.value = 'process'
|
|
||||||
activeIndex.value = 3
|
|
||||||
testDataStructure.value = newValue.data
|
|
||||||
}else if (newValue.code == 25003) { //最终失败
|
|
||||||
|
|
||||||
isShowDialog.value = true
|
|
||||||
step3.value = 'error'
|
|
||||||
ts.value = 'error'
|
|
||||||
step5.value = 'error'
|
|
||||||
testDataStructure.value = newValue.data
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
if (newValue.code == 10201) {
|
||||||
|
step3.value = 'process'
|
||||||
|
step3InitLog.value = [{
|
||||||
|
type: 'wait',
|
||||||
|
log: '正在进行数据对齐检验.....',
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
if (newValue.code == 25002) { //单个监测点失败
|
||||||
|
|
||||||
|
step3InitLog.value.push({
|
||||||
|
type: 'error',
|
||||||
|
log: newValue.data + '数据对齐检验失败!',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (newValue.code == 25001 && newValue.data) { //最终成功
|
||||||
|
isShowDialog.value = true
|
||||||
|
step3.value = 'success'
|
||||||
|
step4.value = 'process'
|
||||||
|
activeIndex.value = 3
|
||||||
|
testDataStructure.value = newValue.data
|
||||||
|
}
|
||||||
|
if (newValue.code == 25003) { //最终失败
|
||||||
|
|
||||||
|
isShowDialog.value = true
|
||||||
|
step3.value = 'error'
|
||||||
|
ts.value = 'error'
|
||||||
|
step5.value = 'error'
|
||||||
|
testDataStructure.value = newValue.data
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'YJC_xujy':
|
case 'YJC_xujy':
|
||||||
switch (newValue.operateCode) {
|
if (newValue.code == 10200) {
|
||||||
case 'DATA_REQUEST$02':
|
step4InitLog.value.push({
|
||||||
if (newValue.code == 10200) {
|
type: 'info',
|
||||||
step4InitLog.value.push({
|
log: newValue.data,
|
||||||
type: 'info',
|
})
|
||||||
log: newValue.data,
|
}
|
||||||
})
|
if (newValue.code == 10201) {
|
||||||
}else if (newValue.code == 10201) {
|
step4.value = 'process'
|
||||||
step4.value = 'process'
|
step4InitLog.value = [{
|
||||||
step4InitLog.value = [{
|
type: 'wait',
|
||||||
type: 'wait',
|
log: '正在进行相序性检.....',
|
||||||
log: '正在进行相序性检.....',
|
}];
|
||||||
}];
|
}
|
||||||
} else if(newValue.code == 25002){
|
if (newValue.code == 25002) {
|
||||||
step4InitLog.value.push({
|
step4InitLog.value.push({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
log: newValue.data,
|
log: newValue.data,
|
||||||
})
|
})
|
||||||
} else if (newValue.code == 25003) {
|
}
|
||||||
step4InitLog.value.push({
|
if (newValue.code == 25003) {
|
||||||
type: 'error',
|
step4InitLog.value.push({
|
||||||
log: newValue.data,
|
type: 'error',
|
||||||
})
|
log: newValue.data,
|
||||||
step4.value = 'error'
|
})
|
||||||
ts.value = 'error'
|
step4.value = 'error'
|
||||||
step5.value = 'error'
|
ts.value = 'error'
|
||||||
} else if (newValue.code == 25001) {
|
step5.value = 'error'
|
||||||
step4.value = 'success'
|
}
|
||||||
step5.value = 'success'
|
if (newValue.code == 25001) {
|
||||||
ts.value = 'success'
|
step4.value = 'success'
|
||||||
activeIndex.value = 4
|
step5.value = 'success'
|
||||||
}
|
ts.value = 'success'
|
||||||
break
|
activeIndex.value = 4
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'quit':
|
case 'quit':
|
||||||
|
|||||||
@@ -53,7 +53,6 @@
|
|||||||
content="子计划信息"
|
content="子计划信息"
|
||||||
>
|
>
|
||||||
<List
|
<List
|
||||||
v-auth.plan="'add_subplan'"
|
|
||||||
@click.stop="childDetail(node.data)"
|
@click.stop="childDetail(node.data)"
|
||||||
style="
|
style="
|
||||||
width: 16px;
|
width: 16px;
|
||||||
|
|||||||
@@ -37,13 +37,7 @@
|
|||||||
<el-button v-if="!isTabPlanFather" icon="CirclePlus" type="primary" @click="addTab('add')">
|
<el-button v-if="!isTabPlanFather" icon="CirclePlus" type="primary" @click="addTab('add')">
|
||||||
新增子计划
|
新增子计划
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-if="isTabPlanFather" icon="Edit" type="primary" @click="addTab('edit')">
|
||||||
v-if="isTabPlanFather && planFormContent?.testState === 0"
|
|
||||||
v-auth.plan="'add_subplan'"
|
|
||||||
icon="Edit"
|
|
||||||
type="primary"
|
|
||||||
@click="addTab('edit')"
|
|
||||||
>
|
|
||||||
编辑子计划
|
编辑子计划
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -375,11 +369,11 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
render: (scope: { row: { checkState: number } }) => {
|
render: (scope: { row: { checkState: number } }) => {
|
||||||
return scope.row.checkState === 0 ? (
|
return scope.row.checkState === 0 ? (
|
||||||
<el-tag type="warning" effect="dark">
|
<el-tag type="primary" effect="dark">
|
||||||
未检
|
未检
|
||||||
</el-tag>
|
</el-tag>
|
||||||
) : scope.row.checkState === 1 ? (
|
) : scope.row.checkState === 1 ? (
|
||||||
<el-tag type="danger" effect="dark">
|
<el-tag type="warning" effect="dark">
|
||||||
检测中
|
检测中
|
||||||
</el-tag>
|
</el-tag>
|
||||||
) : (
|
) : (
|
||||||
@@ -422,7 +416,7 @@ const renderTabs = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 子计划 tabs
|
// 子计划 tabs
|
||||||
if (planFormContent.value?.children?.length > 0) {
|
if (planFormContent.value && planFormContent.value.children && planFormContent.value.children?.length > 0) {
|
||||||
planFormContent.value.children.forEach((child, index) => {
|
planFormContent.value.children.forEach((child, index) => {
|
||||||
tabs.push({
|
tabs.push({
|
||||||
title: child.name,
|
title: child.name,
|
||||||
@@ -451,7 +445,8 @@ const unbindDevice = (row: any) => {
|
|||||||
await subPlanBindDev({ planId: row.planId, devIds: [row.id], bindFlag: 0 }) //解绑 0 绑定 1
|
await subPlanBindDev({ planId: row.planId, devIds: [row.id], bindFlag: 0 }) //解绑 0 绑定 1
|
||||||
// 👇 更新数据(例如清空 state 字段)
|
// 👇 更新数据(例如清空 state 字段)
|
||||||
row.state = '/'
|
row.state = '/'
|
||||||
proTable.value?.getTableList()
|
await proTable.value?.getTableList()
|
||||||
|
await props.refreshTable!()
|
||||||
// 可选:刷新表格或提交接口
|
// 可选:刷新表格或提交接口
|
||||||
ElMessage.success('解绑成功')
|
ElMessage.success('解绑成功')
|
||||||
})
|
})
|
||||||
@@ -478,6 +473,7 @@ const addTab = (type: string) => {
|
|||||||
//收到子组件回复后新增子计划tab
|
//收到子组件回复后新增子计划tab
|
||||||
const addNewChildTab = async () => {
|
const addNewChildTab = async () => {
|
||||||
await props.refreshTable!() //刷新检测计划列表
|
await props.refreshTable!() //刷新检测计划列表
|
||||||
|
proTable.value?.getTableList() // 刷新当前设备列表
|
||||||
renderTabs()
|
renderTabs()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,6 +501,7 @@ const distribute = (childPlan: Plan.ResPlan, scope: any) => {
|
|||||||
.then(async () => {
|
.then(async () => {
|
||||||
await subPlanBindDev({ planId: childPlan.id, devIds: scope.selectedListIds, bindFlag: 1 }) //解绑 0 绑定 1
|
await subPlanBindDev({ planId: childPlan.id, devIds: scope.selectedListIds, bindFlag: 1 }) //解绑 0 绑定 1
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
|
await props.refreshTable!()
|
||||||
ElMessage.success('分配成功')
|
ElMessage.success('分配成功')
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -802,9 +799,10 @@ const importAndMergePlanCheckDataClick = () => {
|
|||||||
}
|
}
|
||||||
planCheckDataImportZip.value?.acceptParams(params)
|
planCheckDataImportZip.value?.acceptParams(params)
|
||||||
}
|
}
|
||||||
const importResult = async (success: boolean | undefined) => {
|
const importResult = async (success: boolean) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
await props.refreshTable!()
|
await props.refreshTable!()
|
||||||
|
proTable.value?.getTableList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ const initTree = (data: Device[]) => {
|
|||||||
filter.value.groupBy
|
filter.value.groupBy
|
||||||
)
|
)
|
||||||
defaultCheckedKeys.value = data.filter(item => item.checked).map(item => item.id)
|
defaultCheckedKeys.value = data.filter(item => item.checked).map(item => item.id)
|
||||||
|
modelValue.value = defaultCheckedKeys.value
|
||||||
// 统计数据
|
// 统计数据
|
||||||
statistics.value.checked = defaultCheckedKeys.value.length
|
statistics.value.checked = defaultCheckedKeys.value.length
|
||||||
statistics.value.total = data.length
|
statistics.value.total = data.length
|
||||||
@@ -412,13 +413,13 @@ const convertToTree = (data: Device[], groupBy?: string | undefined) => {
|
|||||||
const groupNode: Tree = {
|
const groupNode: Tree = {
|
||||||
id: `${groupBy}_${groupName}`,
|
id: `${groupBy}_${groupName}`,
|
||||||
label: groupName,
|
label: groupName,
|
||||||
disabled: props.disabled,
|
|
||||||
children: (items as any[]).map((item: any) => ({
|
children: (items as any[]).map((item: any) => ({
|
||||||
|
...item,
|
||||||
label: item.name,
|
label: item.name,
|
||||||
children: [],
|
children: [],
|
||||||
disabled: item.disabled ? item.disabled : props.disabled,
|
disabled: item.disabled ? item.disabled : props.disabled
|
||||||
...item
|
})),
|
||||||
}))
|
disabled: props.disabled
|
||||||
}
|
}
|
||||||
treeData.push(groupNode)
|
treeData.push(groupNode)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item :label-width="110" label="名称" prop="name">
|
<el-form-item :label-width="110" label="名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
|
:disabled="formContent.testState != 0"
|
||||||
v-model="formContent.name"
|
v-model="formContent.name"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
maxlength="32"
|
maxlength="32"
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="option in pqStandardDevArray"
|
v-for="option in pqStandardDevArray"
|
||||||
:key="option.value"
|
:key="option.value"
|
||||||
:disabled="subPlanBindStandardDev.includes(option.label)"
|
:disabled="subPlanBindStandardDev.includes(option.label) || option.disabled"
|
||||||
:label="option.label"
|
:label="option.label"
|
||||||
:value="option.value"
|
:value="option.value"
|
||||||
/>
|
/>
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
<el-form-item :label-width="110" label="数据源" prop="datasourceIds">
|
<el-form-item :label-width="110" label="数据源" prop="datasourceIds">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formContent.datasourceIds"
|
v-model="formContent.datasourceIds"
|
||||||
:disabled="allDisabled"
|
:disabled="allDisabled || formContent.testState != 0"
|
||||||
:max-collapse-tags="1"
|
:max-collapse-tags="1"
|
||||||
collapse-tags-tooltip
|
collapse-tags-tooltip
|
||||||
:multiple="selectByMode"
|
:multiple="selectByMode"
|
||||||
@@ -209,7 +210,7 @@
|
|||||||
<el-form-item v-if="selectByMode" :label-width="110" label="项目成员" prop="memberIds">
|
<el-form-item v-if="selectByMode" :label-width="110" label="项目成员" prop="memberIds">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formContent.memberIds"
|
v-model="formContent.memberIds"
|
||||||
:disabled="allDisabled"
|
:disabled="allDisabled || formContent.testState != 0"
|
||||||
:multiple="planType == 0"
|
:multiple="planType == 0"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
clearable
|
clearable
|
||||||
@@ -459,11 +460,12 @@ const generateData = () => {
|
|||||||
i.manufacturer = manufacturer.name
|
i.manufacturer = manufacturer.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i.checked = boundPqDevIds.includes(i.id)
|
i.checked = boundPqDevIds.length > 0 ? boundPqDevIds.includes(i.id) : false
|
||||||
if (i.assign) {
|
if (i.checkState && i.checkState != 0) {
|
||||||
i.disabled = i.checkState != 0 || i.assign == 1 || allDisabled.value
|
i.disabled = true
|
||||||
} else {
|
}
|
||||||
i.disabled = allDisabled.value
|
if (allDisabled.value) {
|
||||||
|
i.disabled = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 排序逻辑
|
// 排序逻辑
|
||||||
@@ -668,12 +670,12 @@ const save = () => {
|
|||||||
if (planType.value == 1) {
|
if (planType.value == 1) {
|
||||||
formContent.fatherPlanId = formContent.id
|
formContent.fatherPlanId = formContent.id
|
||||||
formContent.id = ''
|
formContent.id = ''
|
||||||
formContent.memberIds = [formContent.memberIds?.toString()]
|
formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : []
|
||||||
await addPlan(formContent)
|
await addPlan(formContent)
|
||||||
emit('update:tab')
|
emit('update:tab')
|
||||||
// 编辑子计划
|
// 编辑子计划
|
||||||
} else if (planType.value == 2) {
|
} else if (planType.value == 2) {
|
||||||
formContent.memberIds = [formContent.memberIds?.toString()]
|
formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : []
|
||||||
await updatePlan(formContent)
|
await updatePlan(formContent)
|
||||||
emit('update:tab')
|
emit('update:tab')
|
||||||
console.log('更新子计划', formContent)
|
console.log('更新子计划', formContent)
|
||||||
@@ -947,6 +949,13 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
|
|||||||
...user,
|
...user,
|
||||||
disabled: childrenMembers.includes(user.id) || formContent.leader === user.id
|
disabled: childrenMembers.includes(user.id) || formContent.leader === user.id
|
||||||
}))
|
}))
|
||||||
|
const subPlanIds = data.children.map((item: any) => item.id)
|
||||||
|
const subBoundDev_Result = await getBoundPqDevList({ planIdList: subPlanIds })
|
||||||
|
const subBoundDevData = Array.isArray(subBoundDev_Result.data) ? subBoundDev_Result.data : []
|
||||||
|
const subBoundDevIds = subBoundDevData.map((item: any) => item.id)
|
||||||
|
boundPqDevList.value.forEach((item: any) => {
|
||||||
|
item.disabled = subBoundDevIds.includes(item.id)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else if (planType.value === 1) {
|
} else if (planType.value === 1) {
|
||||||
unboundPqDevList.value = boundData.filter((i: any) => !i.boundPlanName) as Device.ResPqDev[]
|
unboundPqDevList.value = boundData.filter((i: any) => !i.boundPlanName) as Device.ResPqDev[]
|
||||||
@@ -1117,14 +1126,16 @@ function pqToArray() {
|
|||||||
if (planType.value === 0) {
|
if (planType.value === 0) {
|
||||||
pqStandardDevArray.value = sourceArray5.map(item => ({
|
pqStandardDevArray.value = sourceArray5.map(item => ({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.id
|
value: item.id,
|
||||||
|
disabled: item.disabled || false
|
||||||
}))
|
}))
|
||||||
} else if (planType.value === 1) {
|
} else if (planType.value === 1) {
|
||||||
pqStandardDevArray.value = sourceArray5
|
pqStandardDevArray.value = sourceArray5
|
||||||
.filter(item => formContent.standardDevIds.includes(item.id))
|
.filter(item => formContent.standardDevIds.includes(item.id))
|
||||||
.map(item => ({
|
.map(item => ({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.id
|
value: item.id,
|
||||||
|
disabled: item.disabled || false
|
||||||
}))
|
}))
|
||||||
formContent.standardDevIds = []
|
formContent.standardDevIds = []
|
||||||
formContent.standardDevMap = new Map<string, number>()
|
formContent.standardDevMap = new Map<string, number>()
|
||||||
@@ -1134,7 +1145,8 @@ function pqToArray() {
|
|||||||
const boundStandardDevAllList = Array.isArray(result.data) ? result.data : []
|
const boundStandardDevAllList = Array.isArray(result.data) ? result.data : []
|
||||||
pqStandardDevArray.value = boundStandardDevAllList.map(item => ({
|
pqStandardDevArray.value = boundStandardDevAllList.map(item => ({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.id
|
value: item.id,
|
||||||
|
disabled: item.disabled || false
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-auth.plan="'analysis'"
|
v-auth.plan="'analysis'"
|
||||||
:icon="List"
|
icon="DataLine"
|
||||||
:disabled="!scope.isSelected"
|
:disabled="!scope.isSelected"
|
||||||
@click="statisticalAnalysisMore(scope.selectedListIds, scope.selectedList)"
|
@click="statisticalAnalysisMore(scope.selectedListIds, scope.selectedList)"
|
||||||
>
|
>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
v-auth.plan="'analysis'"
|
v-auth.plan="'analysis'"
|
||||||
link
|
link
|
||||||
:icon="List"
|
icon="DataLine"
|
||||||
v-if="scope.row.testState == '2'"
|
v-if="scope.row.testState == '2'"
|
||||||
@click="statisticalAnalysis(scope.row)"
|
@click="statisticalAnalysis(scope.row)"
|
||||||
>
|
>
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
<script setup lang="tsx" name="useProTable">
|
<script setup lang="tsx" name="useProTable">
|
||||||
import ProTable from '@/components/ProTable/index.vue'
|
import ProTable from '@/components/ProTable/index.vue'
|
||||||
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
|
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
|
||||||
import { CirclePlus, Delete, Download, List, Upload } from '@element-plus/icons-vue'
|
import { CirclePlus, Delete, Download, Upload } from '@element-plus/icons-vue'
|
||||||
import {
|
import {
|
||||||
deletePlan,
|
deletePlan,
|
||||||
downloadTemplate,
|
downloadTemplate,
|
||||||
@@ -342,11 +342,11 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
|
|||||||
fieldNames: { label: 'label', value: 'id' },
|
fieldNames: { label: 'label', value: 'id' },
|
||||||
render: scope => {
|
render: scope => {
|
||||||
return scope.row.testState === 0 ? (
|
return scope.row.testState === 0 ? (
|
||||||
<el-tag type="warning" effect="dark">
|
<el-tag type="primary" effect="dark">
|
||||||
未检
|
未检
|
||||||
</el-tag>
|
</el-tag>
|
||||||
) : scope.row.testState === 1 ? (
|
) : scope.row.testState === 1 ? (
|
||||||
<el-tag type="danger" effect="dark">
|
<el-tag type="warning" effect="dark">
|
||||||
检测中
|
检测中
|
||||||
</el-tag>
|
</el-tag>
|
||||||
) : (
|
) : (
|
||||||
@@ -365,7 +365,7 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
|
|||||||
<el-progress
|
<el-progress
|
||||||
text-inside={true}
|
text-inside={true}
|
||||||
stroke-width={20}
|
stroke-width={20}
|
||||||
percentage={(scope.row.progress ?? 0) * 100}
|
percentage={Number(((scope.row.progress ?? 0) * 100).toFixed(2))}
|
||||||
status="success"
|
status="success"
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user