|
@@ -88,31 +88,6 @@
|
|
<HcUpload :fileList="fileListData" :datas="uploadData" @change='uploadChange'/>
|
|
<HcUpload :fileList="fileListData" :datas="uploadData" @change='uploadChange'/>
|
|
</HcDialog>
|
|
</HcDialog>
|
|
|
|
|
|
- <!--插入设计值/频率-->
|
|
|
|
- <HcDialog :show="IDVFModal" title="插入设计值/频率" widths="600px" saveText="确认插入" @close="IDVFModal = false" @save="IDVFModalSaveClick">
|
|
|
|
- <el-alert title="填写完设计值和频率,系统自动计算实测值" type="warning" :closable="false"/>
|
|
|
|
- <el-form ref="formIDVFRef" :model="formIDVFModel" label-width="auto" size="large">
|
|
|
|
- <div class="form-item-div text-center mb-3">
|
|
|
|
- <el-radio-group size="large" v-model="formIDVFModel.type">
|
|
|
|
- <el-radio :label="1">公路工程</el-radio>
|
|
|
|
- <el-radio :label="2" class="ml-4">水利水电</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </div>
|
|
|
|
- <el-form-item label="设计值">
|
|
|
|
- <el-input v-model="formIDVFModel.design" placeholder="请输入设计值"/>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="频率" v-if="formIDVFModel.type === 1">
|
|
|
|
- <el-input v-model="formIDVFModel.size" placeholder="请输入频率"/>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="容量" v-if="formIDVFModel.type === 2">
|
|
|
|
- <el-input v-model="formIDVFModel.capacity" placeholder="请输入容量"/>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="合格点数">
|
|
|
|
- <el-input v-model="formIDVFModel.fail" placeholder="请填写合格点数(不填写则默认全部合格)"/>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- </HcDialog>
|
|
|
|
-
|
|
|
|
<!--插入特殊字符-->
|
|
<!--插入特殊字符-->
|
|
<HcDialog :show="specialModal" title="插入特殊字符" widths="600px" saveText="确认插入" @close="specialModal = false" @save="specialNodeClick">
|
|
<HcDialog :show="specialModal" title="插入特殊字符" widths="600px" saveText="确认插入" @close="specialModal = false" @save="specialNodeClick">
|
|
<el-form ref="specialFormRef" :model="specialFormModel" :rules="specialFormRules" label-width="0px" size="large" class="mb-6">
|
|
<el-form ref="specialFormRef" :model="specialFormModel" :rules="specialFormRules" label-width="0px" size="large" class="mb-6">
|
|
@@ -129,10 +104,16 @@
|
|
</el-row>
|
|
</el-row>
|
|
</HcDialog>
|
|
</HcDialog>
|
|
|
|
|
|
- <!--关联试验数据-->
|
|
|
|
- <HcDialog :show="CTDModal" title="关联试验数据" widths="850px" saveText="确认关联" @close="CTDModal = false" @save="CTDModal = false">
|
|
|
|
- 开发中...
|
|
|
|
|
|
+ <!--引用容器参数-->
|
|
|
|
+ <HcDialog :show="vesselModal" title="引用容器参数" widths="700px" saveText="确认引用" isTable @close="vesselModalClose" @save="vesselModalSave">
|
|
|
|
+ <HcTable ref="vesselTableRef" :column="vesselTableColumn" :datas="vesselTableData" :loading="vesselTableLoading" isCheck @selection-change="vesselTableSelection"/>
|
|
</HcDialog>
|
|
</HcDialog>
|
|
|
|
+
|
|
|
|
+ <!--引用设备仪器-->
|
|
|
|
+ <HcDialog :show="deviceModal" title="引用设备仪器" widths="850px" saveText="确认引用" isTable @close="deviceModalClose" @save="deviceModalSave">
|
|
|
|
+ <HcTable ref="deviceTableRef" :column="deviceTableColumn" :datas="deviceTableData" :loading="deviceTableLoading" isCheck @selection-change="deviceTableSelection"/>
|
|
|
|
+ </HcDialog>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -247,7 +228,9 @@ const formRegExpJson = ref({})
|
|
const getExcelHtml = async (item,index) => {
|
|
const getExcelHtml = async (item,index) => {
|
|
const pkeyIds = getValString(item.pKeyId)
|
|
const pkeyIds = getValString(item.pKeyId)
|
|
if (pkeyIds) {
|
|
if (pkeyIds) {
|
|
|
|
+ const { id } = baseData.value
|
|
const {error, code, data} = await dataApi.getExcelHtml({
|
|
const {error, code, data} = await dataApi.getExcelHtml({
|
|
|
|
+ id: id,
|
|
primaryKeyId: pkeyIds
|
|
primaryKeyId: pkeyIds
|
|
}, false)
|
|
}, false)
|
|
const resData = isString(data) ? data || '' : ''
|
|
const resData = isString(data) ? data || '' : ''
|
|
@@ -306,7 +289,9 @@ const setTableFormBlurReg = (pkeyId, event, key, reg, val, msg, item, index) =>
|
|
const getBussDataInfo = async (item, index) => {
|
|
const getBussDataInfo = async (item, index) => {
|
|
const pkeyIds = getValString(item.pKeyId)
|
|
const pkeyIds = getValString(item.pKeyId)
|
|
if (pkeyIds) {
|
|
if (pkeyIds) {
|
|
|
|
+ const { id } = baseData.value
|
|
const {error, code, data} = await dataApi.getBussDataInfo({
|
|
const {error, code, data} = await dataApi.getBussDataInfo({
|
|
|
|
+ id: id,
|
|
pkeyId: pkeyIds
|
|
pkeyId: pkeyIds
|
|
}, false)
|
|
}, false)
|
|
const resData = getObjNullValue(data)
|
|
const resData = getObjNullValue(data)
|
|
@@ -371,7 +356,9 @@ const saveExcelBussData = async (item, index, showTip = true) => {
|
|
const getBussPdfInfo = async ({pKeyId}, showTip = true) => {
|
|
const getBussPdfInfo = async ({pKeyId}, showTip = true) => {
|
|
const pkeyIds = getValString(pKeyId)
|
|
const pkeyIds = getValString(pKeyId)
|
|
if (pkeyIds) {
|
|
if (pkeyIds) {
|
|
|
|
+ const { id } = baseData.value
|
|
const {error, code, data} = await dataApi.getBussPdf({
|
|
const {error, code, data} = await dataApi.getBussPdf({
|
|
|
|
+ id: id,
|
|
pKeyId: pkeyIds
|
|
pKeyId: pkeyIds
|
|
},false)
|
|
},false)
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
@@ -391,20 +378,17 @@ const getBussPdfInfo = async ({pKeyId}, showTip = true) => {
|
|
}
|
|
}
|
|
|
|
|
|
//删除本表
|
|
//删除本表
|
|
-const delClick = async (item) => {
|
|
|
|
- const pkeyIds = item.pKeyId ? item.pKeyId + '' : ''
|
|
|
|
|
|
+const delClick = async ({pKeyId}) => {
|
|
|
|
+ const pkeyIds = getValString(pKeyId)
|
|
if (pkeyIds) {
|
|
if (pkeyIds) {
|
|
- if (isStatus.value !== '3') {
|
|
|
|
- const {error, code} = await wbsApi.removeBussTabInfo({
|
|
|
|
- pkeyid: pkeyIds,
|
|
|
|
- classify: classify.value,
|
|
|
|
- })
|
|
|
|
- if (!error && code === 200) {
|
|
|
|
- window?.$message?.success('操作成功')
|
|
|
|
- renewData()
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- window?.$message?.warning('已上报的资料,不允许删除')
|
|
|
|
|
|
+ const { id } = baseData.value
|
|
|
|
+ const {error, code} = await dataApi.removeBussTabInfo({
|
|
|
|
+ id: id,
|
|
|
|
+ pKeyId: pkeyIds
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window?.$message?.success('操作成功')
|
|
|
|
+ renewData()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
window?.$message?.warning('pkeyId为空')
|
|
window?.$message?.warning('pkeyId为空')
|
|
@@ -439,7 +423,9 @@ const copyClick = async (item,index) => {
|
|
}
|
|
}
|
|
|
|
|
|
const copeBussTab = async (pkeyIds) => {
|
|
const copeBussTab = async (pkeyIds) => {
|
|
|
|
+ const { id } = baseData.value
|
|
const {error, code} = await dataApi.copyBussTab({
|
|
const {error, code} = await dataApi.copyBussTab({
|
|
|
|
+ id: id,
|
|
pKeyId: pkeyIds
|
|
pKeyId: pkeyIds
|
|
})
|
|
})
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
@@ -453,8 +439,10 @@ const hideClick = async ({pKeyId, isBussShow}) => {
|
|
const pkeyIds = getValString(pKeyId)
|
|
const pkeyIds = getValString(pKeyId)
|
|
if (pkeyIds) {
|
|
if (pkeyIds) {
|
|
if (isStatus.value !== '3') {
|
|
if (isStatus.value !== '3') {
|
|
|
|
+ const { id } = baseData.value
|
|
const isBussShows = isBussShow === 2 ? 1 : 2 //状态(1显示 2隐藏)
|
|
const isBussShows = isBussShow === 2 ? 1 : 2 //状态(1显示 2隐藏)
|
|
const {error, code} = await dataApi.showBussTab({
|
|
const {error, code} = await dataApi.showBussTab({
|
|
|
|
+ id: id,
|
|
pKeyId: pkeyIds,
|
|
pKeyId: pkeyIds,
|
|
status: isBussShows
|
|
status: isBussShows
|
|
})
|
|
})
|
|
@@ -530,9 +518,9 @@ const tableFormItemNode = ref({})
|
|
|
|
|
|
//菜单数据
|
|
//菜单数据
|
|
const tableFormMenu = ref([
|
|
const tableFormMenu = ref([
|
|
- {label: '插入设计值/频率', key: "IDVF"},
|
|
|
|
|
|
+ {label: '容器参数', key: "vessel"},
|
|
|
|
+ {label: '引用设备仪器', key: "device"},
|
|
{label: '插入特殊字符', key: "special"},
|
|
{label: '插入特殊字符', key: "special"},
|
|
- {label: '关联试验数据', key: "CTD"},
|
|
|
|
])
|
|
])
|
|
|
|
|
|
//鼠标右键事件
|
|
//鼠标右键事件
|
|
@@ -549,19 +537,84 @@ const onRightClick = (event, KeyName, index) => {
|
|
|
|
|
|
//鼠标右键菜单被点击
|
|
//鼠标右键菜单被点击
|
|
const handleMenuSelect = ({key}) => {
|
|
const handleMenuSelect = ({key}) => {
|
|
- if (key === 'IDVF') {
|
|
|
|
- IDVFModal.value = true
|
|
|
|
|
|
+ if (key === 'vessel') {
|
|
|
|
+ vesselModal.value = true
|
|
|
|
+ getVesselTableData()
|
|
} else if (key === 'special') {
|
|
} else if (key === 'special') {
|
|
specialModalShow()
|
|
specialModalShow()
|
|
- } else if (key === 'CTD') {
|
|
|
|
- CTDModal.value = true
|
|
|
|
|
|
+ } else if (key === 'device') {
|
|
|
|
+ deviceModal.value = true
|
|
|
|
+ getDeviceTableData()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-//插入设计值
|
|
|
|
-const IDVFModal = ref(false)
|
|
|
|
-const formIDVFRef = ref(null)
|
|
|
|
-const formIDVFModel = ref({type: 1, design: '', size: '', dev: '', key: '', capacity: '', fail: '', pkId: ''})
|
|
|
|
|
|
+//引用容器参数
|
|
|
|
+const vesselModal = ref(false)
|
|
|
|
+const vesselTableRef = ref(null)
|
|
|
|
+
|
|
|
|
+//表格数据
|
|
|
|
+const vesselTableColumn = ref([
|
|
|
|
+ {key:'key1', name: '容器编号'},
|
|
|
|
+])
|
|
|
|
+const vesselTableData = ref([])
|
|
|
|
+
|
|
|
|
+//获取表格数据
|
|
|
|
+const vesselTableLoading = ref(false)
|
|
|
|
+const getVesselTableData = () => {
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//多选
|
|
|
|
+const vesselTableKeys = ref([]);
|
|
|
|
+const vesselTableSelection = (rows) => {
|
|
|
|
+ vesselTableKeys.value = rows
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//确认引用
|
|
|
|
+const vesselModalSave = () => {
|
|
|
|
+ vesselModal.value = false
|
|
|
|
+}
|
|
|
|
+//关闭
|
|
|
|
+const vesselModalClose = () => {
|
|
|
|
+ vesselModal.value = false
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+//引用设备仪器
|
|
|
|
+const deviceModal = ref(false)
|
|
|
|
+const deviceTableRef = ref(null)
|
|
|
|
+
|
|
|
|
+//表格数据
|
|
|
|
+const deviceTableColumn = ref([
|
|
|
|
+ {key:'key1', name: '设备编号'},
|
|
|
|
+ {key:'key2', name: '设备仪器名称'},
|
|
|
|
+])
|
|
|
|
+const deviceTableData = ref([])
|
|
|
|
+
|
|
|
|
+//获取表格数据
|
|
|
|
+const deviceTableLoading = ref(false)
|
|
|
|
+const getDeviceTableData = () => {
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//多选
|
|
|
|
+const deviceTableKeys = ref([]);
|
|
|
|
+const deviceTableSelection = (rows) => {
|
|
|
|
+ deviceTableKeys.value = rows
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//确认引用
|
|
|
|
+const deviceModalSave = () => {
|
|
|
|
+ deviceModal.value = false
|
|
|
|
+}
|
|
|
|
+//关闭
|
|
|
|
+const deviceModalClose = () => {
|
|
|
|
+ deviceModal.value = false
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
//插入特殊字符
|
|
//插入特殊字符
|
|
const specialModal = ref(false)
|
|
const specialModal = ref(false)
|
|
@@ -630,33 +683,6 @@ const specialNodeClick = async () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-//关联试验数据
|
|
|
|
-const CTDModal = ref(false)
|
|
|
|
-
|
|
|
|
-//设计值频率计算
|
|
|
|
-const IDVFModalSaveClick = async () => {
|
|
|
|
- const {pkeyId, KeyName, index} = tableFormItemNode.value
|
|
|
|
- if (pkeyId) {
|
|
|
|
- const { design, size } = formIDVFModel.value
|
|
|
|
- const { error, code, data } = await wbsApi.queryFormulaRange({
|
|
|
|
- ...formIDVFModel.value,
|
|
|
|
- dev: (!design && !size) ? '±5': '',
|
|
|
|
- key: KeyName,
|
|
|
|
- pkId: pkeyId
|
|
|
|
- })
|
|
|
|
- //处理数据
|
|
|
|
- const res = getObjNullValue(data)
|
|
|
|
- if (!error && code === 200 && res) {
|
|
|
|
- Object.keys(data).forEach(key => {
|
|
|
|
- formData.value[index][key] = data[key]
|
|
|
|
- })
|
|
|
|
- IDVFModal.value = false
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- window?.$message?.warning('pkeyId为空')
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
//事件
|
|
//事件
|
|
const emit = defineEmits(['renew','offsetTop'])
|
|
const emit = defineEmits(['renew','offsetTop'])
|
|
|
|
|