duy 1 rok pred
rodič
commit
ab4424b3d2

+ 6 - 99
src/views/transfer/components/table-collect.vue

@@ -37,7 +37,7 @@
                                 is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
                                 @selection-change="tableSelection"
                             /> -->
-                            <visualTable :table-data="item1.list " />
+                            <visualTable :table-data="item1.list " @getTableKeys="getTableKeys" />
                         </div>
                     </HcCardItem>
                 </template>
@@ -133,119 +133,26 @@ const getTotalData = async ()=>{
      
     }
 }
-//tab数据和相关处理
-const tabKey = ref('tab2')
-const tabData = ref([
-    // { key:'tab1', name: '全部汇总' },
-    { key:'tab2', name: '历史验收报告' },
-    { key:'tab3', name: '历史整改报告' },
-])
-const tabChange = (item) => {
-    tabKey.value = item?.key
-}
-
-
-//------立项审批
-
-//搜索表单
-const searchForm = ref({
-    current: 1, size: 20, total: 0,
-})
 
-//分页被点击
-const pageChange = ({ current, size }) => {
-    searchForm.value.current = current
-    searchForm.value.size = size
-    getTableData()
-}
 
-//表头
-const tableRef = ref(null)
-const tableColumn = ref([
-    { key:'fileNumber', name: '档号', width: 180 },
-    { key:'name', name: '案卷题名' },
-    { key:'pageN', name: '总页数', width: 120 },
-    { key:'storageTimeValue', name: '保管期限', width: 120 },
-    { key:'remark', name: '备注' },
-])
-const tableData = ref([])
 
-//获取数据
-const tableLoading = ref(false)
-const getTableData = async () => {
+//------立项审批
 
-}
 
-//多选
-const tableKeys = ref([])
-const tableSelection = (rows) => {
-    tableKeys.value = rows
-}
 
-//------勘察设计文件
 
-//搜索表单
-const searchFormFile = ref({
-    current: 1, size: 20, total: 0,
-})
 
-//分页被点击
-const pageFileChange = ({ current, size }) => {
-    searchFormFile.value.current = current
-    searchFormFile.value.size = size
-    getTableFileData()
-}
 
-//表头
-const tableFileRef = ref(null)
-const tableFileColumn = ref([
-    { key:'key1', name: '档号', width: 180 },
-    { key:'key2', name: '案卷题名' },
-    { key:'key3', name: '总页数', width: 120 },
-    { key:'key4', name: '保管期限', width: 120 },
-    { key:'key5', name: '备注' },
-])
-const tableFileData = ref([
-    {
-        id: 1,
-        key1: 'FJZB-02-123',
-        key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key3: '293',
-        key4: '永久',
-        key5: '备注信息',
-    },
-    {
-        id: 2,
-        key1: 'FJZB-02-123',
-        key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key3: '293',
-        key4: '永久',
-        key5: '备注信息',
-    },
-    {
-        id: 2,
-        key1: 'FJZB-02-123',
-        key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
-        key3: '293',
-        key4: '永久',
-        key5: '备注信息',
-    },
-])
 
-//获取数据
-const tableFileLoading = ref(false)
-const getTableFileData = async () => {
 
-}
 
-//多选
-const tableFileKeys = ref([])
-const tableeFileSelection = (rows) => {
-    tableFileKeys.value = rows
-}
 
 
 //上报
+const tableKeys = ref([])
+const getTableKeys = (val)=>{
+    tableKeys.value = val
+}
 const reportIds = ref('')
 const reportTaskName = ref('')
 const reportDatas = ref([])

+ 10 - 37
src/views/transfer/components/visual-table.vue

@@ -1,62 +1,35 @@
 <!--  -->
 <template>
-    <!-- <el-table
-        ref="myTable"
-        v-loading="loading"
-        :data="tableData"
-        height="250"
-        border
-        element-loading-background="rgba(0, 0, 0, 0.8)"
-        class="table-left color-table"
-    >
-        <el-table-column label="序号" type="index" align="center" width="56" />
-        <el-table-column
-            prop="fileNumber"
-            label="档号"
-            align="center"
-        />
-        <el-table-column
-            prop="name"
-            label="案卷题名"
-            align="center"
-        />
-        <el-table-column
-            prop="pageN"
-            label="总页数"
-            align="center"
-        />
-        <el-table-column
-            prop="storageTimeValue"
-            label="保管期限"
-            align="center"
-        />
-        <el-table-column
-            prop="remark"
-            label="备注"
-            align="center"
-        />
-    </el-table> -->
     <HcTable
         ref="tableRef"
         heights="250px" :column="tableColumn" :datas="tableData" :loading="tableLoaing"
         is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
+        @selection-change="tableSelection"
     />
 </template>
 
 <script setup>
-import { getCurrentInstance, nextTick, onMounted, ref, watch } from 'vue'
+import { getCurrentInstance, onMounted, ref, watch } from 'vue'
 const props = defineProps({
     tableData: {
         type: Array,
         default: () => ([]),
     },
 })
+//事件
+const emit = defineEmits(['getTableKeys'])
 const { proxy } = getCurrentInstance()
 
 const allData = ref(props.tableData)
 const needle = ref(10)//数据指针 默认19
 const tableData = ref([])
 const tableLoaing = ref(false)
+//多选
+const tableKeys = ref([])
+const tableSelection = (rows) => {
+    tableKeys.value = rows
+    emit('getTableKeys', rows)
+}
 //表头
 const tableRef = ref(null)
 const tableColumn = ref([