|
@@ -2,11 +2,14 @@
|
|
|
<hc-drawer v-model="isShow" ui="hc-project-list-adjust-excel-drawer" to-id="hc-layout-box" is-close @close="drawerClose">
|
|
|
<hc-page-split :fold="false" :options="splitOptions">
|
|
|
<template #left>
|
|
|
- <hc-card>
|
|
|
- 自定义左边的区域
|
|
|
+ <hc-card :title="`【调整表单】${dataInfo.tableName}`">
|
|
|
+ <hc-table-form ref="excelRef" :html="excelHtml" @tap="excelClick" />
|
|
|
</hc-card>
|
|
|
</template>
|
|
|
<hc-card>
|
|
|
+ <template #header>
|
|
|
+ <el-segmented v-model="tabsKey" :options="tabsProps" @change="tabsChange" />
|
|
|
+ </template>
|
|
|
其它内容
|
|
|
</hc-card>
|
|
|
</hc-page-split>
|
|
@@ -16,8 +19,9 @@
|
|
|
<script setup>
|
|
|
import { ref, watch } from 'vue'
|
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
-import { getArrValue, isNullES, isString } from 'js-fast-way'
|
|
|
+import { getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
|
|
|
import { getDictionaryData } from '~uti/tools'
|
|
|
+import excelApi from '~api/exctab/exceltab'
|
|
|
import wbsTreeApi from '~api/wbs/tree'
|
|
|
import mainApi from '~api/wbs/private'
|
|
|
|
|
@@ -39,7 +43,7 @@ const isShow = defineModel('modelValue', {
|
|
|
//监听数据
|
|
|
const dataInfo = ref(props.info)
|
|
|
watch(() => props.info, (data) => {
|
|
|
- dataInfo.value = data
|
|
|
+ dataInfo.value = getObjValue(data)
|
|
|
}, { immediate: true, deep: true })
|
|
|
|
|
|
//监听显示
|
|
@@ -54,9 +58,36 @@ const splitOptions = {
|
|
|
minSize: [300, 300],
|
|
|
}
|
|
|
|
|
|
+//选项卡
|
|
|
+const tabsKey = ref('tab1')
|
|
|
+const tabsProps = [
|
|
|
+ { label: '输入框', value: 'tab1' },
|
|
|
+ { label: '电签位置', value: 'tab2' },
|
|
|
+ { label: '公式条件', value: 'tab3' },
|
|
|
+ { label: '默认信息', value: 'tab4' },
|
|
|
+ { label: '提示信息', value: 'tab5' },
|
|
|
+]
|
|
|
+const tabsChange = (val) => {
|
|
|
+ console.log(val)
|
|
|
+}
|
|
|
+
|
|
|
//处理相关数据
|
|
|
-const getDataApi = () => {
|
|
|
+const excelRef = ref(null)
|
|
|
+const excelHtml = ref('')
|
|
|
+const getDataApi = async () => {
|
|
|
+ const { pkeyId, excelId } = getObjValue(dataInfo.value)
|
|
|
+ if (isNullES(pkeyId) || isNullES(excelId)) {
|
|
|
+ window?.$message.warning('表单值异常,请联系管理员')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const { data } = await excelApi.getExcelHtml({ pkeyId })
|
|
|
+ excelHtml.value = data || ''
|
|
|
+}
|
|
|
|
|
|
+//框框被点击
|
|
|
+const excelClick = async (item) => {
|
|
|
+ //let key = item.target.getAttribute('data-index')
|
|
|
+ console.log(item)
|
|
|
}
|
|
|
|
|
|
//关闭抽屉
|
|
@@ -73,5 +104,11 @@ const drawerClose = () => {
|
|
|
<style lang="scss">
|
|
|
.el-overlay .el-drawer.hc-project-list-adjust-excel-drawer {
|
|
|
background-color: #F1F5F8;
|
|
|
+ .hc-table-form-data-item {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ .hc-table-form-data-item .hc-excel-table-form {
|
|
|
+ background: #e4e7eb;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|