|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
<div class="header_title">
|
|
|
<div class="text-bold">项目信息</div>
|
|
|
- <el-link type="primary">关联委托单</el-link>
|
|
|
+ <el-link type="primary" @click="linkCommission">关联委托单</el-link>
|
|
|
</div>
|
|
|
<div class="form-box">
|
|
|
<el-form :model="formModal" label-width="auto">
|
|
@@ -188,7 +188,7 @@
|
|
|
<div class="header_title">
|
|
|
<div class="text-bold">设备信息</div>
|
|
|
<div>
|
|
|
- <el-link type="primary">关联设备</el-link>
|
|
|
+ <el-link type="primary" @click.stop="linkAcquisitionClick(item, index)">关联设备</el-link>
|
|
|
<el-link type="primary" class="ml-2">关联上次设备</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -227,6 +227,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</hc-new-dialog>
|
|
|
+ <!-- 关联委托单 -->
|
|
|
+ <LinkAssociation v-model="isLinksAssociation" :cid="contractId" @change="commissionChange" @close="isLinksAssociation = false" />
|
|
|
+
|
|
|
+ <!-- 关联设备数据 -->
|
|
|
+ <hc-new-dialog v-model="isLinkAcquisition" is-table is-footer-center title="关联设备数据" widths="80%" @close="linksAcquisitionClose">
|
|
|
+ <LinkAcquisition v-if="isLinkAcquisition" v-model="linkAcquisitionLoadDataId" @change="linkAcquisitionChange" />
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="linksAcquisitionClose">取消</el-button>
|
|
|
+ <el-button hc-btn type="primary" :loading="linksAcquisitionLoading" @click="linksAcquisitionClick">确定</el-button>
|
|
|
+ </template>
|
|
|
+ </hc-new-dialog>
|
|
|
</hc-drawer>
|
|
|
</template>
|
|
|
|
|
@@ -236,6 +247,8 @@ import TestTree from '../../material/components/TestTree.vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import { getArrValue } from 'js-fast-way'
|
|
|
import dataApi from '~api/tentative/detect/test'
|
|
|
+import LinkAssociation from '../../detect/components/linkAssociation.vue'
|
|
|
+import LinkAcquisition from '../../detect/components/linkAcquisition.vue'
|
|
|
const useAppState = useAppStore()
|
|
|
const userInfo = ref(useAppState.getUserInfo)
|
|
|
const projectId = ref(useAppState.getProjectId)
|
|
@@ -246,6 +259,8 @@ const handleRefresh = () => {}
|
|
|
const isShow = defineModel('modelValue', {
|
|
|
default: false,
|
|
|
})
|
|
|
+const value = ref('')
|
|
|
+
|
|
|
const formModal = ref({})
|
|
|
const checkOptions = ref([])
|
|
|
const tableColumn = [
|
|
@@ -338,6 +353,58 @@ const tableSampleCheckedKeys = ref([])
|
|
|
const linksSampleTableSelection = (rows) => {
|
|
|
tableSampleCheckedKeys.value = rows
|
|
|
}
|
|
|
+//关联委托单
|
|
|
+const linkCommission = ()=>{
|
|
|
+ isLinksAssociation.value = true
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//关联委托单
|
|
|
+const isLinksAssociation = ref(false)
|
|
|
+
|
|
|
+//委托单确定选择
|
|
|
+const commissionChange = (id) => {
|
|
|
+ console.log(id)
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//关联设备
|
|
|
+//关联设备数据
|
|
|
+const isLinkAcquisition = ref(false)
|
|
|
+const linkAcquisitionLoadDataId = ref('')
|
|
|
+const linkAcquisitionIndex = ref(-1)
|
|
|
+const linkAcquisitionRow = ref({})
|
|
|
+const linkAcquisitionClick = (item, index) => {
|
|
|
+ isLinkAcquisition.value = true
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//确定
|
|
|
+const linksAcquisitionLoading = ref(false)
|
|
|
+const linksAcquisitionClick = async () => {
|
|
|
+ linksAcquisitionLoading.value = true
|
|
|
+ const item = linkAcquisitionRow.value
|
|
|
+ const index = linkAcquisitionIndex.value
|
|
|
+ const dataId = linkAcquisitionLoadDataId.value
|
|
|
+ listDatas.value[index].loadDataId = dataId
|
|
|
+ formData.value[index].loadDataId = dataId
|
|
|
+ await tableFormSaveClick(item, index)
|
|
|
+ linksAcquisitionClose()
|
|
|
+}
|
|
|
+
|
|
|
+//关闭关联
|
|
|
+const linksAcquisitionClose = () => {
|
|
|
+ isLinkAcquisition.value = false
|
|
|
+ linkAcquisitionRow.value = {}
|
|
|
+ linkAcquisitionLoadDataId.value = null
|
|
|
+ linkAcquisitionIndex.value = -1
|
|
|
+ linksAcquisitionLoading.value = false
|
|
|
+}
|
|
|
+
|
|
|
+const linkAcquisitionChange = (ids) => {
|
|
|
+ console.log(ids)
|
|
|
+ linkAcquisitionLoadDataId.value = ids
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|