|
@@ -10,13 +10,13 @@
|
|
<hc-card scrollbar>
|
|
<hc-card scrollbar>
|
|
<h3 class="mb-2">引用元素表</h3>
|
|
<h3 class="mb-2">引用元素表</h3>
|
|
<ElTree
|
|
<ElTree
|
|
|
|
+ v-if="isShowTree"
|
|
:load="treeLoadNode"
|
|
:load="treeLoadNode"
|
|
:props="treeProps"
|
|
:props="treeProps"
|
|
accordion
|
|
accordion
|
|
highlight-current
|
|
highlight-current
|
|
lazy
|
|
lazy
|
|
@node-click="treeNodeTap"
|
|
@node-click="treeNodeTap"
|
|
- v-if="isShowTree"
|
|
|
|
/>
|
|
/>
|
|
</hc-card>
|
|
</hc-card>
|
|
</template>
|
|
</template>
|
|
@@ -30,16 +30,17 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template #extra>
|
|
<template #extra>
|
|
- <el-button hc-btn type="primary" @click="quteEleTableClick"
|
|
|
|
- >引用元素表单库</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button hc-btn type="primary" @click="quteEleTableClick">
|
|
|
|
+ 引用元素表单库
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
hc-btn
|
|
hc-btn
|
|
type="danger"
|
|
type="danger"
|
|
- @click="batchDel"
|
|
|
|
:loading="batchDelLoad"
|
|
:loading="batchDelLoad"
|
|
- >删除元素表</el-button
|
|
|
|
|
|
+ @click="batchDel"
|
|
>
|
|
>
|
|
|
|
+ 删除元素表
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
<hc-table
|
|
<hc-table
|
|
:column="tableColumn"
|
|
:column="tableColumn"
|
|
@@ -51,29 +52,31 @@
|
|
@selection-change="tableCheckChange"
|
|
@selection-change="tableCheckChange"
|
|
>
|
|
>
|
|
<template #action="{ row }">
|
|
<template #action="{ row }">
|
|
- <el-link type="primary" @click="linkExcelClick(row)"
|
|
|
|
- >关联清表</el-link
|
|
|
|
- >
|
|
|
|
|
|
+ <el-link type="primary" @click="linkExcelClick(row)">
|
|
|
|
+ 关联清表
|
|
|
|
+ </el-link>
|
|
<el-link
|
|
<el-link
|
|
v-loading="editElementLoading"
|
|
v-loading="editElementLoading"
|
|
type="primary"
|
|
type="primary"
|
|
- @click="editElement(row)"
|
|
|
|
:disabled="row.excelIds == -1"
|
|
:disabled="row.excelIds == -1"
|
|
- >编辑元素</el-link
|
|
|
|
|
|
+ @click="editElement(row)"
|
|
>
|
|
>
|
|
|
|
+ 编辑元素
|
|
|
|
+ </el-link>
|
|
<el-link
|
|
<el-link
|
|
v-loading="adjustExcelLoading"
|
|
v-loading="adjustExcelLoading"
|
|
type="primary"
|
|
type="primary"
|
|
- @click="adjustExcelClick(row)"
|
|
|
|
:disabled="row.excelIds == -1"
|
|
:disabled="row.excelIds == -1"
|
|
- >调整表单</el-link
|
|
|
|
- >
|
|
|
|
- <el-link type="primary" @click="rowFormulaClick(row)"
|
|
|
|
- >编辑公式</el-link
|
|
|
|
- >
|
|
|
|
- <el-link type="primary" @click="assignWbs(row)"
|
|
|
|
- >分配WBS</el-link
|
|
|
|
|
|
+ @click="adjustExcelClick(row)"
|
|
>
|
|
>
|
|
|
|
+ 调整表单
|
|
|
|
+ </el-link>
|
|
|
|
+ <el-link type="primary" @click="rowFormulaClick(row)">
|
|
|
|
+ 编辑公式
|
|
|
|
+ </el-link>
|
|
|
|
+ <el-link type="primary" @click="assignWbs(row)">
|
|
|
|
+ 分配WBS
|
|
|
|
+ </el-link>
|
|
</template>
|
|
</template>
|
|
</hc-table>
|
|
</hc-table>
|
|
<template #action>
|
|
<template #action>
|
|
@@ -84,9 +87,9 @@
|
|
<!-- 引用元素表 -->
|
|
<!-- 引用元素表 -->
|
|
<quteElePage
|
|
<quteElePage
|
|
v-model="quteEleShow"
|
|
v-model="quteEleShow"
|
|
- :projectId="projectId"
|
|
|
|
|
|
+ :project-id="projectId"
|
|
@close="quteEleClose"
|
|
@close="quteEleClose"
|
|
- ></quteElePage>
|
|
|
|
|
|
+ />
|
|
<!-- 关联清表 -->
|
|
<!-- 关联清表 -->
|
|
<HcAssociationList
|
|
<HcAssociationList
|
|
v-model="isAssociationShow"
|
|
v-model="isAssociationShow"
|
|
@@ -110,300 +113,301 @@
|
|
<!-- 分配WBS -->
|
|
<!-- 分配WBS -->
|
|
<allocateWbs
|
|
<allocateWbs
|
|
v-model="isAllocateShow"
|
|
v-model="isAllocateShow"
|
|
- :wbsType="wbsType"
|
|
|
|
- :projectId="projectId"
|
|
|
|
|
|
+ :wbs-type="wbsType"
|
|
|
|
+ :project-id="projectId"
|
|
:data="allocateWbsInfo"
|
|
:data="allocateWbsInfo"
|
|
- ></allocateWbs>
|
|
|
|
|
|
+ />
|
|
</hc-drawer>
|
|
</hc-drawer>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, watch, nextTick } from "vue";
|
|
|
|
-import { HcDelMsg } from "hc-vue3-ui";
|
|
|
|
-import { getArrValue, arrToId, isNullES, deepClone } from "js-fast-way";
|
|
|
|
-import privateApi from "~api/wbs/private";
|
|
|
|
-import excelApi from "~api/exctab/exceltab";
|
|
|
|
-import quteElePage from "./quteElePage.vue";
|
|
|
|
-import HcAssociationList from "../association-list.vue";
|
|
|
|
-import HcEditElement from "../edit-element.vue";
|
|
|
|
-import HcAdjustExcel from "../adjust-excel.vue";
|
|
|
|
-import allocateWbs from "./allocateWbs.vue";
|
|
|
|
-//事件
|
|
|
|
-const emit = defineEmits(["close"]);
|
|
|
|
-
|
|
|
|
-//双向绑定
|
|
|
|
-const isShow = defineModel("modelValue", {
|
|
|
|
- default: false,
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
-//监听显示
|
|
|
|
-watch(isShow, (val) => {
|
|
|
|
- if (val) getDataApi();
|
|
|
|
-});
|
|
|
|
|
|
+import { nextTick, ref, watch } from 'vue'
|
|
|
|
+import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
|
+import { arrToId, deepClone, getArrValue, isNullES } from 'js-fast-way'
|
|
|
|
+import privateApi from '~api/wbs/private'
|
|
|
|
+import excelApi from '~api/exctab/exceltab'
|
|
|
|
+import quteElePage from './quteElePage.vue'
|
|
|
|
+import HcAssociationList from '../association-list.vue'
|
|
|
|
+import HcEditElement from '../edit-element.vue'
|
|
|
|
+import HcAdjustExcel from '../adjust-excel.vue'
|
|
|
|
+import allocateWbs from './allocateWbs.vue'
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
projectId: {
|
|
projectId: {
|
|
type: String,
|
|
type: String,
|
|
- default: "",
|
|
|
|
|
|
+ default: '',
|
|
},
|
|
},
|
|
wbsType: {
|
|
wbsType: {
|
|
type: [String, Number],
|
|
type: [String, Number],
|
|
- default: "",
|
|
|
|
|
|
+ default: '',
|
|
},
|
|
},
|
|
wbsId: {
|
|
wbsId: {
|
|
type: [String, Number],
|
|
type: [String, Number],
|
|
- default: "",
|
|
|
|
|
|
+ default: '',
|
|
},
|
|
},
|
|
-});
|
|
|
|
-const projectId = ref(props.projectId);
|
|
|
|
-const wbsId = ref(props.wbsId);
|
|
|
|
-const wbsType = ref(props.wbsType);
|
|
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//事件
|
|
|
|
+const emit = defineEmits(['close'])
|
|
|
|
+
|
|
|
|
+//双向绑定
|
|
|
|
+const isShow = defineModel('modelValue', {
|
|
|
|
+ default: false,
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//监听显示
|
|
|
|
+watch(isShow, (val) => {
|
|
|
|
+ if (val) getDataApi()
|
|
|
|
+})
|
|
|
|
+const projectId = ref(props.projectId)
|
|
|
|
+const wbsId = ref(props.wbsId)
|
|
|
|
+const wbsType = ref(props.wbsType)
|
|
//监听数据
|
|
//监听数据
|
|
watch(
|
|
watch(
|
|
() => [props.projectId, props.wbsId, props.wbsType],
|
|
() => [props.projectId, props.wbsId, props.wbsType],
|
|
([pid, wid, wtype]) => {
|
|
([pid, wid, wtype]) => {
|
|
- projectId.value = pid;
|
|
|
|
- wbsId.value = wid;
|
|
|
|
- wbsType.value = wtype;
|
|
|
|
|
|
+ projectId.value = pid
|
|
|
|
+ wbsId.value = wid
|
|
|
|
+ wbsType.value = wtype
|
|
},
|
|
},
|
|
- { deep: true }
|
|
|
|
-);
|
|
|
|
|
|
+ { deep: true },
|
|
|
|
+)
|
|
//处理相关数据
|
|
//处理相关数据
|
|
-const getDataApi = () => {};
|
|
|
|
|
|
+const getDataApi = () => {}
|
|
|
|
|
|
//获取数据
|
|
//获取数据
|
|
-const tabTypeLazyTree = async (parentId = "12345678910") => {
|
|
|
|
|
|
+const tabTypeLazyTree = async (parentId = '12345678910') => {
|
|
//发起请求
|
|
//发起请求
|
|
const { data } = await privateApi.tabTypeLazyTree({
|
|
const { data } = await privateApi.tabTypeLazyTree({
|
|
parentId,
|
|
parentId,
|
|
current: 1,
|
|
current: 1,
|
|
size: 1000,
|
|
size: 1000,
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
- });
|
|
|
|
- const records = getArrValue(data?.records);
|
|
|
|
|
|
+ })
|
|
|
|
+ const records = getArrValue(data?.records)
|
|
records.forEach((item) => {
|
|
records.forEach((item) => {
|
|
- item.isLeaf = !item.hasChildren;
|
|
|
|
- });
|
|
|
|
- return { data: records, total: data?.total };
|
|
|
|
-};
|
|
|
|
-const isShowTree = ref(true);
|
|
|
|
|
|
+ item.isLeaf = !item.hasChildren
|
|
|
|
+ })
|
|
|
|
+ return { data: records, total: data?.total }
|
|
|
|
+}
|
|
|
|
+const isShowTree = ref(true)
|
|
const refreshTree = () => {
|
|
const refreshTree = () => {
|
|
- isShowTree.value = false;
|
|
|
|
|
|
+ isShowTree.value = false
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- isShowTree.value = true;
|
|
|
|
- }, 1000);
|
|
|
|
-};
|
|
|
|
|
|
+ isShowTree.value = true
|
|
|
|
+ }, 1000)
|
|
|
|
+}
|
|
const treeLoadNode = async (node, resolve) => {
|
|
const treeLoadNode = async (node, resolve) => {
|
|
if (node.level === 0) {
|
|
if (node.level === 0) {
|
|
- const resData = await tabTypeLazyTree();
|
|
|
|
- resolve(resData?.data);
|
|
|
|
|
|
+ const resData = await tabTypeLazyTree()
|
|
|
|
+ resolve(resData?.data)
|
|
} else {
|
|
} else {
|
|
const resData = await tabTypeLazyTree(
|
|
const resData = await tabTypeLazyTree(
|
|
node?.data?.primaryKeyId,
|
|
node?.data?.primaryKeyId,
|
|
- "",
|
|
|
|
|
|
+ '',
|
|
false,
|
|
false,
|
|
{
|
|
{
|
|
current: 1,
|
|
current: 1,
|
|
size: 2000,
|
|
size: 2000,
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
- }
|
|
|
|
- );
|
|
|
|
- resolve(resData?.data);
|
|
|
|
|
|
+ },
|
|
|
|
+ )
|
|
|
|
+ resolve(resData?.data)
|
|
}
|
|
}
|
|
-};
|
|
|
|
|
|
+}
|
|
|
|
|
|
//树节点被点击
|
|
//树节点被点击
|
|
-const nodeInfo = ref({});
|
|
|
|
|
|
+const nodeInfo = ref({})
|
|
const treeProps = {
|
|
const treeProps = {
|
|
- label: "title",
|
|
|
|
|
|
+ label: 'title',
|
|
isLeaf: (item) => {
|
|
isLeaf: (item) => {
|
|
- return !item.hasChildren;
|
|
|
|
|
|
+ return !item.hasChildren
|
|
},
|
|
},
|
|
-};
|
|
|
|
|
|
+}
|
|
const treeNodeTap = (data, node) => {
|
|
const treeNodeTap = (data, node) => {
|
|
- nodeInfo.value = data;
|
|
|
|
- searchForm.value.parentId = data.id;
|
|
|
|
|
|
+ nodeInfo.value = data
|
|
|
|
+ searchForm.value.parentId = data.id
|
|
|
|
|
|
if (node?.level === 1) {
|
|
if (node?.level === 1) {
|
|
- searchClick();
|
|
|
|
|
|
+ searchClick()
|
|
} else if (node?.level === 2) {
|
|
} else if (node?.level === 2) {
|
|
- searchForm.value.total = 1;
|
|
|
|
- tableData.value = [data];
|
|
|
|
|
|
+ searchForm.value.total = 1
|
|
|
|
+ tableData.value = [data]
|
|
}
|
|
}
|
|
-};
|
|
|
|
|
|
+}
|
|
|
|
|
|
//搜索表单
|
|
//搜索表单
|
|
-const searchForm = ref({ current: 1, size: 30, total: 0 });
|
|
|
|
|
|
+const searchForm = ref({ current: 1, size: 30, total: 0 })
|
|
|
|
|
|
//搜索
|
|
//搜索
|
|
const searchClick = () => {
|
|
const searchClick = () => {
|
|
- const { parentId } = searchForm.value;
|
|
|
|
|
|
+ const { parentId } = searchForm.value
|
|
if (isNullES(parentId)) {
|
|
if (isNullES(parentId)) {
|
|
- window?.$message?.warning("请先在左侧点击一个节点");
|
|
|
|
- return;
|
|
|
|
|
|
+ window?.$message?.warning('请先在左侧点击一个节点')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- searchForm.value.current = 1;
|
|
|
|
- getTableData();
|
|
|
|
-};
|
|
|
|
|
|
+ searchForm.value.current = 1
|
|
|
|
+ getTableData()
|
|
|
|
+}
|
|
|
|
|
|
//分页
|
|
//分页
|
|
const pageChange = ({ current, size }) => {
|
|
const pageChange = ({ current, size }) => {
|
|
- const { parentId } = searchForm.value;
|
|
|
|
|
|
+ const { parentId } = searchForm.value
|
|
if (isNullES(parentId)) {
|
|
if (isNullES(parentId)) {
|
|
- window?.$message?.warning("请先在左侧点击一个节点");
|
|
|
|
- return;
|
|
|
|
|
|
+ window?.$message?.warning('请先在左侧点击一个节点')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- searchForm.value.current = current;
|
|
|
|
- searchForm.value.size = size;
|
|
|
|
- getTableData();
|
|
|
|
-};
|
|
|
|
|
|
+ searchForm.value.current = current
|
|
|
|
+ searchForm.value.size = size
|
|
|
|
+ getTableData()
|
|
|
|
+}
|
|
|
|
|
|
//表格数据
|
|
//表格数据
|
|
-const tableData = ref([]);
|
|
|
|
|
|
+const tableData = ref([])
|
|
const tableColumn = ref([
|
|
const tableColumn = ref([
|
|
- { key: "title", name: "名称" },
|
|
|
|
- { key: "elementTotal", name: "总量", width: 80, align: "center" },
|
|
|
|
- { key: "tabOwner", name: "所属方", width: 140, align: "center" },
|
|
|
|
- { key: "fillRate", name: "填报率", width: 80, align: "center" },
|
|
|
|
- { key: "action", name: "操作", width: 220, align: "center" },
|
|
|
|
-]);
|
|
|
|
|
|
+ { key: 'title', name: '名称' },
|
|
|
|
+ { key: 'elementTotal', name: '总量', width: 80, align: 'center' },
|
|
|
|
+ { key: 'tabOwner', name: '所属方', width: 140, align: 'center' },
|
|
|
|
+ { key: 'fillRate', name: '填报率', width: 80, align: 'center' },
|
|
|
|
+ { key: 'action', name: '操作', width: 220, align: 'center' },
|
|
|
|
+])
|
|
|
|
|
|
//获取表格数据
|
|
//获取表格数据
|
|
-const tableLoading = ref(false);
|
|
|
|
|
|
+const tableLoading = ref(false)
|
|
const getTableData = async () => {
|
|
const getTableData = async () => {
|
|
- tableData.value = [];
|
|
|
|
- tableLoading.value = true;
|
|
|
|
|
|
+ tableData.value = []
|
|
|
|
+ tableLoading.value = true
|
|
const { data } = await privateApi.tabTypeLazyTree({
|
|
const { data } = await privateApi.tabTypeLazyTree({
|
|
...searchForm.value,
|
|
...searchForm.value,
|
|
total: null,
|
|
total: null,
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
- });
|
|
|
|
- tableLoading.value = false;
|
|
|
|
- tableData.value = getArrValue(data?.records);
|
|
|
|
- searchForm.value.total = data?.total || 0;
|
|
|
|
-};
|
|
|
|
|
|
+ })
|
|
|
|
+ tableLoading.value = false
|
|
|
|
+ tableData.value = getArrValue(data?.records)
|
|
|
|
+ searchForm.value.total = data?.total || 0
|
|
|
|
+}
|
|
|
|
|
|
//表格被选择
|
|
//表格被选择
|
|
-const tableCheckKeys = ref([]);
|
|
|
|
|
|
+const tableCheckKeys = ref([])
|
|
const tableCheckChange = (rows) => {
|
|
const tableCheckChange = (rows) => {
|
|
- tableCheckKeys.value = rows;
|
|
|
|
-};
|
|
|
|
|
|
+ tableCheckKeys.value = rows
|
|
|
|
+}
|
|
|
|
|
|
//关联清表
|
|
//关联清表
|
|
|
|
|
|
-const isAssociationShow = ref(false);
|
|
|
|
-const associationInfo = ref({});
|
|
|
|
|
|
+const isAssociationShow = ref(false)
|
|
|
|
+const associationInfo = ref({})
|
|
|
|
|
|
const linkExcelClick = async (item) => {
|
|
const linkExcelClick = async (item) => {
|
|
- associationInfo.value = item;
|
|
|
|
- await nextTick();
|
|
|
|
- isAssociationShow.value = true;
|
|
|
|
-};
|
|
|
|
|
|
+ associationInfo.value = item
|
|
|
|
+ await nextTick()
|
|
|
|
+ isAssociationShow.value = true
|
|
|
|
+}
|
|
|
|
|
|
//公式配置
|
|
//公式配置
|
|
-const rowFormulaClick = (row) => {};
|
|
|
|
|
|
+const rowFormulaClick = (row) => {}
|
|
//分配WBS
|
|
//分配WBS
|
|
-const isAllocateShow = ref(false);
|
|
|
|
-const allocateWbsInfo = ref({});
|
|
|
|
|
|
+const isAllocateShow = ref(false)
|
|
|
|
+const allocateWbsInfo = ref({})
|
|
const assignWbs = (row) => {
|
|
const assignWbs = (row) => {
|
|
- allocateWbsInfo.value = row;
|
|
|
|
- isAllocateShow.value = true;
|
|
|
|
-};
|
|
|
|
|
|
+ allocateWbsInfo.value = row
|
|
|
|
+ isAllocateShow.value = true
|
|
|
|
+}
|
|
|
|
|
|
//编辑元素
|
|
//编辑元素
|
|
-const isEditElementShow = ref(false);
|
|
|
|
-const editElementInfo = ref({});
|
|
|
|
-const editElementData = ref({});
|
|
|
|
-const editElementLoading = ref(false);
|
|
|
|
|
|
+const isEditElementShow = ref(false)
|
|
|
|
+const editElementInfo = ref({})
|
|
|
|
+const editElementData = ref({})
|
|
|
|
+const editElementLoading = ref(false)
|
|
const editElement = async (row) => {
|
|
const editElement = async (row) => {
|
|
- editElementLoading.value = true;
|
|
|
|
- const { code, data } = await excelApi.getExcelHtml({ pkeyId: row.id });
|
|
|
|
|
|
+ editElementLoading.value = true
|
|
|
|
+ const { code, data } = await excelApi.getExcelHtml({ pkeyId: row.id })
|
|
if (code !== 200 || isNullES(data)) {
|
|
if (code !== 200 || isNullES(data)) {
|
|
- editElementLoading.value = false;
|
|
|
|
- window?.$message.warning("表单异常,请联系管理员");
|
|
|
|
- return;
|
|
|
|
|
|
+ editElementLoading.value = false
|
|
|
|
+ window?.$message.warning('表单异常,请联系管理员')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- editElementLoading.value = false;
|
|
|
|
- editElementInfo.value = row;
|
|
|
|
|
|
+ editElementLoading.value = false
|
|
|
|
+ editElementInfo.value = row
|
|
editElementData.value = {
|
|
editElementData.value = {
|
|
pid: projectId.value,
|
|
pid: projectId.value,
|
|
wbsid: wbsId.value,
|
|
wbsid: wbsId.value,
|
|
- };
|
|
|
|
- await nextTick();
|
|
|
|
- isEditElementShow.value = true;
|
|
|
|
-};
|
|
|
|
|
|
+ }
|
|
|
|
+ await nextTick()
|
|
|
|
+ isEditElementShow.value = true
|
|
|
|
+}
|
|
//编辑元素里的跳转页面
|
|
//编辑元素里的跳转页面
|
|
const editElementToPage = async (name) => {
|
|
const editElementToPage = async (name) => {
|
|
- const row = deepClone(editElementInfo.value);
|
|
|
|
|
|
+ const row = deepClone(editElementInfo.value)
|
|
//表单调整
|
|
//表单调整
|
|
- if (name === "adjustment") {
|
|
|
|
- adjustExcelInfo.value = deepClone(row);
|
|
|
|
- await nextTick();
|
|
|
|
- isAdjustExcelShow.value = true;
|
|
|
|
|
|
+ if (name === 'adjustment') {
|
|
|
|
+ adjustExcelInfo.value = deepClone(row)
|
|
|
|
+ await nextTick()
|
|
|
|
+ isAdjustExcelShow.value = true
|
|
}
|
|
}
|
|
//公式配置
|
|
//公式配置
|
|
- if (name === "formula") {
|
|
|
|
- console.log("还没做");
|
|
|
|
|
|
+ if (name === 'formula') {
|
|
|
|
+ console.log('还没做')
|
|
}
|
|
}
|
|
-};
|
|
|
|
|
|
+}
|
|
|
|
|
|
//调整表单
|
|
//调整表单
|
|
-const isAdjustExcelShow = ref(false);
|
|
|
|
-const adjustExcelLoading = ref(false);
|
|
|
|
-const adjustExcelInfo = ref({});
|
|
|
|
|
|
+const isAdjustExcelShow = ref(false)
|
|
|
|
+const adjustExcelLoading = ref(false)
|
|
|
|
+const adjustExcelInfo = ref({})
|
|
const adjustExcelClick = async (row) => {
|
|
const adjustExcelClick = async (row) => {
|
|
- const { primaryKeyId, excelIds } = row;
|
|
|
|
|
|
+ const { primaryKeyId, excelIds } = row
|
|
if (isNullES(primaryKeyId) || isNullES(excelIds)) {
|
|
if (isNullES(primaryKeyId) || isNullES(excelIds)) {
|
|
- window?.$message.warning("表单值异常,请联系管理员");
|
|
|
|
- return;
|
|
|
|
|
|
+ window?.$message.warning('表单值异常,请联系管理员')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- adjustExcelLoading.value = true;
|
|
|
|
|
|
+ adjustExcelLoading.value = true
|
|
const { code, data } = await excelApi.getExcelHtml({
|
|
const { code, data } = await excelApi.getExcelHtml({
|
|
pkeyId: primaryKeyId,
|
|
pkeyId: primaryKeyId,
|
|
- });
|
|
|
|
|
|
+ })
|
|
if (code !== 200 || isNullES(data)) {
|
|
if (code !== 200 || isNullES(data)) {
|
|
- adjustExcelLoading.value = false;
|
|
|
|
- window?.$message.warning("表单异常,请联系管理员");
|
|
|
|
- return;
|
|
|
|
|
|
+ adjustExcelLoading.value = false
|
|
|
|
+ window?.$message.warning('表单异常,请联系管理员')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- adjustExcelInfo.value = deepClone(row);
|
|
|
|
- adjustExcelLoading.value = false;
|
|
|
|
- isAdjustExcelShow.value = true;
|
|
|
|
-};
|
|
|
|
|
|
+ adjustExcelInfo.value = deepClone(row)
|
|
|
|
+ adjustExcelLoading.value = false
|
|
|
|
+ isAdjustExcelShow.value = true
|
|
|
|
+}
|
|
//关闭抽屉
|
|
//关闭抽屉
|
|
const drawerClose = () => {
|
|
const drawerClose = () => {
|
|
- isShow.value = false;
|
|
|
|
- emit("close");
|
|
|
|
-};
|
|
|
|
|
|
+ isShow.value = false
|
|
|
|
+ emit('close')
|
|
|
|
+}
|
|
//删除元素表
|
|
//删除元素表
|
|
-const batchDelLoad = ref(false);
|
|
|
|
|
|
+const batchDelLoad = ref(false)
|
|
const batchDel = async () => {
|
|
const batchDel = async () => {
|
|
if (tableCheckKeys.value.length == 0) {
|
|
if (tableCheckKeys.value.length == 0) {
|
|
- window?.$message?.warning("请先选择一个元素");
|
|
|
|
- return;
|
|
|
|
|
|
+ window?.$message?.warning('请先选择一个元素')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
HcDelMsg(async (resolve) => {
|
|
HcDelMsg(async (resolve) => {
|
|
//发起请求
|
|
//发起请求
|
|
- const ids = arrToId(tableCheckKeys.value);
|
|
|
|
|
|
+ const ids = arrToId(tableCheckKeys.value)
|
|
const { isRes } = await privateApi.delAprojectTab({
|
|
const { isRes } = await privateApi.delAprojectTab({
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
primaryKeyIds: ids,
|
|
primaryKeyIds: ids,
|
|
- });
|
|
|
|
- resolve(); //关闭弹窗
|
|
|
|
- if (!isRes) return;
|
|
|
|
- window.$message.success("删除成功");
|
|
|
|
- getTableData().then();
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
|
|
+ })
|
|
|
|
+ resolve() //关闭弹窗
|
|
|
|
+ if (!isRes) return
|
|
|
|
+ window.$message.success('删除成功')
|
|
|
|
+ getTableData().then()
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
//引用元素表单库
|
|
//引用元素表单库
|
|
-const quteEleShow = ref(false);
|
|
|
|
|
|
+const quteEleShow = ref(false)
|
|
const quteEleTableClick = () => {
|
|
const quteEleTableClick = () => {
|
|
- quteEleShow.value = true;
|
|
|
|
-};
|
|
|
|
|
|
+ quteEleShow.value = true
|
|
|
|
+}
|
|
const quteEleClose = () => {
|
|
const quteEleClose = () => {
|
|
- quteEleShow.value = false;
|
|
|
|
- getTableData().then();
|
|
|
|
- refreshTree();
|
|
|
|
-};
|
|
|
|
|
|
+ quteEleShow.value = false
|
|
|
|
+ getTableData().then()
|
|
|
|
+ refreshTree()
|
|
|
|
+}
|
|
</script>
|
|
</script>
|