ZaiZai 11 tháng trước cách đây
mục cha
commit
4c3d49e404

+ 20 - 2
src/views/desk/test-collect.vue

@@ -6,7 +6,7 @@
         <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }">
             <template #action="{ row }">
                 <el-link type="primary" @click="editRowClick(row)">编辑</el-link>
-                <el-link type="warning">配置划分</el-link>
+                <el-link type="warning" @click="partitioningClick(row)">配置划分</el-link>
                 <el-link type="success">关联清表</el-link>
                 <el-link type="info">数据映射配置</el-link>
                 <el-link type="danger" @click="delRowClick(row)">删除</el-link>
@@ -28,13 +28,16 @@
                 <el-button hc-btn type="primary" :loading="rowInfoLoading" @click="rowInfoSubmit">提交</el-button>
             </template>
         </hc-dialog>
+        <!-- 配置划分 -->
+        <HcPartitioning v-model="isPartitioningShow" :data="partitioningData" @close="partitioningClose" />
     </hc-card>
 </template>
 
 <script setup>
-import { onActivated, ref } from 'vue'
+import { nextTick, onActivated, ref } from 'vue'
 import { deepClone, formValidate, getArrValue, isNullES } from 'js-fast-way'
 import { HcDelMsg } from 'hc-vue3-ui'
+import HcPartitioning from './test-collect/partitioning.vue'
 import mainApi from '~api/desk/test-collect'
 
 //激活
@@ -130,6 +133,21 @@ const delRowClick = (item) => {
         getTableData().then()
     })
 }
+
+//配置划分
+const isPartitioningShow = ref(false)
+const partitioningData = ref({})
+const partitioningClick = async (item) => {
+    partitioningData.value = deepClone(item)
+    await nextTick()
+    isPartitioningShow.value = true
+}
+
+//关闭 配置划分
+const partitioningClose = () => {
+    isPartitioningShow.value = false
+    partitioningData.value = {}
+}
 </script>
 
 <style lang="scss">

+ 57 - 0
src/views/desk/test-collect/partitioning.vue

@@ -0,0 +1,57 @@
+<template>
+    <hc-dialog v-model="isShow" widths="800px" is-footer-center is-table title="关联试验划分树" @close="dialogClose">
+        <el-alert :closable="false" title="勾选试验划分节点,被勾选的节点数据将会汇总到当前台账分类中" type="warning" />
+        11111
+        <template #footer>
+            <el-button hc-btn @click="dialogClose">取消</el-button>
+            <el-button hc-btn type="primary" :loading="submitLoading" @click="dialogSubmit">提交</el-button>
+        </template>
+    </hc-dialog>
+</template>
+
+<script setup>
+import { ref, watch } from 'vue'
+import { formValidate, getArrValue } from 'js-fast-way'
+import mainApi from '~api/desk/test-collect'
+
+const props = defineProps({
+    data: {
+        type: Object,
+        default: () => ({}),
+    },
+})
+
+//事件
+const emit = defineEmits(['close'])
+
+//双向绑定
+// eslint-disable-next-line no-undef
+const isShow = defineModel('modelValue', {
+    default: false,
+})
+
+//监听可否编辑
+const dataInfo = ref(props.data)
+watch(() => props.data, (data) => {
+    dataInfo.value = data
+}, { immediate: true, deep: true })
+
+//监听显示
+watch(isShow, () => getDataApi())
+const getDataApi = () => {
+    console.log(dataInfo.value)
+}
+
+//提交表单
+const submitLoading = ref(false)
+const dialogSubmit = async () => {
+
+}
+
+//关闭弹窗
+const dialogClose = () => {
+    isShow.value = false
+    submitLoading.value = false
+    emit('close')
+}
+</script>