UPDATE: 优化;
This commit is contained in:
@@ -34,6 +34,7 @@ export namespace StandardDevice {
|
||||
createTime?: string | null; //创建时间
|
||||
updateBy?: string | null; //更新用户
|
||||
updateTime?: string | null; //更新时间
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ const handleImportResponse = (res: any) => {
|
||||
if (!parameter.value.progressBar) {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage.success('导入成功')
|
||||
emit('result', true)
|
||||
dialogVisible.value = false
|
||||
emit('result', res.data)
|
||||
} else {
|
||||
ElMessage.error(res.message)
|
||||
fileDisabled.value = false
|
||||
@@ -195,8 +195,8 @@ const initSSE = () => {
|
||||
progressData.value.status = 'success'
|
||||
eventSource.value!.close()
|
||||
ElMessage.success('导入成功')
|
||||
dialogVisible.value = false
|
||||
emit('result', true)
|
||||
dialogVisible.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
content="子计划信息"
|
||||
>
|
||||
<List
|
||||
v-auth.plan="'add_subplan'"
|
||||
@click.stop="childDetail(node.data)"
|
||||
style="
|
||||
width: 16px;
|
||||
|
||||
@@ -37,13 +37,7 @@
|
||||
<el-button v-if="!isTabPlanFather" icon="CirclePlus" type="primary" @click="addTab('add')">
|
||||
新增子计划
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="isTabPlanFather && planFormContent?.testState === 0"
|
||||
v-auth.plan="'add_subplan'"
|
||||
icon="Edit"
|
||||
type="primary"
|
||||
@click="addTab('edit')"
|
||||
>
|
||||
<el-button v-if="isTabPlanFather" icon="Edit" type="primary" @click="addTab('edit')">
|
||||
编辑子计划
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -375,11 +369,11 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
fixed: 'right',
|
||||
render: (scope: { row: { checkState: number } }) => {
|
||||
return scope.row.checkState === 0 ? (
|
||||
<el-tag type="warning" effect="dark">
|
||||
<el-tag type="primary" effect="dark">
|
||||
未检
|
||||
</el-tag>
|
||||
) : scope.row.checkState === 1 ? (
|
||||
<el-tag type="danger" effect="dark">
|
||||
<el-tag type="warning" effect="dark">
|
||||
检测中
|
||||
</el-tag>
|
||||
) : (
|
||||
@@ -478,6 +472,7 @@ const addTab = (type: string) => {
|
||||
//收到子组件回复后新增子计划tab
|
||||
const addNewChildTab = async () => {
|
||||
await props.refreshTable!() //刷新检测计划列表
|
||||
proTable.value?.getTableList() // 刷新当前设备列表
|
||||
renderTabs()
|
||||
}
|
||||
|
||||
|
||||
@@ -412,13 +412,13 @@ const convertToTree = (data: Device[], groupBy?: string | undefined) => {
|
||||
const groupNode: Tree = {
|
||||
id: `${groupBy}_${groupName}`,
|
||||
label: groupName,
|
||||
disabled: props.disabled,
|
||||
children: (items as any[]).map((item: any) => ({
|
||||
...item,
|
||||
label: item.name,
|
||||
children: [],
|
||||
disabled: item.disabled ? item.disabled : props.disabled,
|
||||
...item
|
||||
}))
|
||||
disabled: item.disabled ? item.disabled : props.disabled
|
||||
})),
|
||||
disabled: props.disabled
|
||||
}
|
||||
treeData.push(groupNode)
|
||||
})
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<el-col :span="9">
|
||||
<el-form-item :label-width="110" label="名称" prop="name">
|
||||
<el-input
|
||||
:disabled="formContent.testState != 0"
|
||||
v-model="formContent.name"
|
||||
autocomplete="off"
|
||||
maxlength="32"
|
||||
@@ -35,7 +36,7 @@
|
||||
<el-option
|
||||
v-for="option in pqStandardDevArray"
|
||||
:key="option.value"
|
||||
:disabled="subPlanBindStandardDev.includes(option.label)"
|
||||
:disabled="subPlanBindStandardDev.includes(option.label) || option.disabled"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
@@ -83,7 +84,7 @@
|
||||
<el-form-item :label-width="110" label="数据源" prop="datasourceIds">
|
||||
<el-select
|
||||
v-model="formContent.datasourceIds"
|
||||
:disabled="allDisabled"
|
||||
:disabled="allDisabled || formContent.testState != 0"
|
||||
:max-collapse-tags="1"
|
||||
collapse-tags-tooltip
|
||||
:multiple="selectByMode"
|
||||
@@ -209,7 +210,7 @@
|
||||
<el-form-item v-if="selectByMode" :label-width="110" label="项目成员" prop="memberIds">
|
||||
<el-select
|
||||
v-model="formContent.memberIds"
|
||||
:disabled="allDisabled"
|
||||
:disabled="allDisabled || formContent.testState != 0"
|
||||
:multiple="planType == 0"
|
||||
autocomplete="off"
|
||||
clearable
|
||||
@@ -460,10 +461,9 @@ const generateData = () => {
|
||||
}
|
||||
}
|
||||
i.checked = boundPqDevIds.includes(i.id)
|
||||
if (i.assign) {
|
||||
i.disabled = i.checkState != 0 || i.assign == 1 || allDisabled.value
|
||||
} else {
|
||||
i.disabled = allDisabled.value
|
||||
i.disabled = i.checkState != 0
|
||||
if (allDisabled.value) {
|
||||
i.disabled = true
|
||||
}
|
||||
})
|
||||
// 排序逻辑
|
||||
@@ -1117,14 +1117,16 @@ function pqToArray() {
|
||||
if (planType.value === 0) {
|
||||
pqStandardDevArray.value = sourceArray5.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id
|
||||
value: item.id,
|
||||
disabled: item.disabled || false
|
||||
}))
|
||||
} else if (planType.value === 1) {
|
||||
pqStandardDevArray.value = sourceArray5
|
||||
.filter(item => formContent.standardDevIds.includes(item.id))
|
||||
.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id
|
||||
value: item.id,
|
||||
disabled: item.disabled || false
|
||||
}))
|
||||
formContent.standardDevIds = []
|
||||
formContent.standardDevMap = new Map<string, number>()
|
||||
@@ -1134,7 +1136,8 @@ function pqToArray() {
|
||||
const boundStandardDevAllList = Array.isArray(result.data) ? result.data : []
|
||||
pqStandardDevArray.value = boundStandardDevAllList.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id
|
||||
value: item.id,
|
||||
disabled: item.disabled || false
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
v-auth.plan="'analysis'"
|
||||
:icon="List"
|
||||
icon="DataLine"
|
||||
:disabled="!scope.isSelected"
|
||||
@click="statisticalAnalysisMore(scope.selectedListIds, scope.selectedList)"
|
||||
>
|
||||
@@ -342,11 +342,11 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
|
||||
fieldNames: { label: 'label', value: 'id' },
|
||||
render: scope => {
|
||||
return scope.row.testState === 0 ? (
|
||||
<el-tag type="warning" effect="dark">
|
||||
<el-tag type="primary" effect="dark">
|
||||
未检
|
||||
</el-tag>
|
||||
) : scope.row.testState === 1 ? (
|
||||
<el-tag type="danger" effect="dark">
|
||||
<el-tag type="warning" effect="dark">
|
||||
检测中
|
||||
</el-tag>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user