665e78d7 by lihua

控制运营方按钮

1 parent 67c809d7
......@@ -12,7 +12,7 @@ import {
import { changeNum, download } from '@/utils/common';
import { ElMessage } from 'element-plus';
import anonResultAnalysis from './components/anonResultAnalysis.vue';
import { commonPageConfig } from '@/utils/enum';
import { commonPageConfig, USERROLE } from '@/utils/enum';
import { calcColumnWidth } from '@/utils';
import html2canvas from 'html2canvas';
......@@ -23,6 +23,11 @@ const taskGuid = ref(route.query.guid);
const { proxy } = getCurrentInstance() as any;
const resultDataLoading = ref(false);
/** 是否是数据提供方 */
const isDataProvider = computed(() => {
return localStorage.getItem('userRole') == USERROLE.PROVIDER;
})
const downPromise: any = ref()
/** 提交保存和编辑后的执行guid */
......@@ -253,12 +258,14 @@ onBeforeMount(() => {
<template>
<div class="table_tool_wrap" v-loading="resultDataLoading" ref="containerRef" :element-loading-text="loadingText">
<!-- 连接器不需要显示下载报告按钮 -->
<!-- <el-button v-show="!isWordStyle" style="margin-bottom: 8px;" type="primary" @click="transfer"
v-preReClick>生成Word评估报告</el-button>
<div v-show="isWordStyle" style="margin-bottom: 8px;">
<el-button @click="isWordStyle = false">返回</el-button>
<el-button type="primary" @click="downloadWord">下载评估报告</el-button>
</div> -->
<template v-if="!isDataProvider">
<el-button v-show="!isWordStyle" style="margin-bottom: 8px;" type="primary" @click="transfer"
v-preReClick>生成Word评估报告</el-button>
<div v-show="isWordStyle" style="margin-bottom: 8px;">
<el-button @click="isWordStyle = false">返回</el-button>
<el-button type="primary" @click="downloadWord">下载评估报告</el-button>
</div>
</template>
<anonResultAnalysis ref="resultReportRef" :show-title="true" :analysis-result-info="analysisResultInfo"
:isWordStyle="isWordStyle" :style="isWordStyle ? {
height: '100%',
......@@ -269,7 +276,8 @@ onBeforeMount(() => {
} : null" :analysis-result-loading="analysisResultLoading"
:analysis-result-table-fields="analysisResultTableFields" :old-anon-task-value-info="oldAnonTaskValueInfo"
:container-width="containerWidth" :origin-result-table-field-column="originResultTableFieldColumn"
:page-info="pageInfo" :result-data="resultData" :fullResultData="fullResultData" @page-change="pageChange"></anonResultAnalysis>
:page-info="pageInfo" :result-data="resultData" :fullResultData="fullResultData" @page-change="pageChange">
</anonResultAnalysis>
</div>
</template>
......
......@@ -5,7 +5,7 @@
<script lang="ts" setup name="resultProcess">
import TableTools from "@/components/Tools/table_tools.vue";
import { commonPageConfig } from '@/components/PageNav/index';
import { TableColumnWidth } from "@/utils/enum";
import { TableColumnWidth, USERROLE } from "@/utils/enum";
import {
dataSourceTypeList,
getAnonTaskList,
......@@ -19,6 +19,11 @@ const router = useRouter()
const { proxy } = getCurrentInstance() as any;
const { required } = useValidator();
/** 是否是数据提供方 */
const isDataProvider = computed(() => {
return localStorage.getItem('userRole') == USERROLE.PROVIDER;
})
const searchItemList = ref([{
type: "input",
label: "",
......@@ -56,6 +61,7 @@ const tableInfo = ref({
},
{ label: "任务状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" },
{ label: "导出时间", field: "exportTime", width: TableColumnWidth.DATETIME },
{ label: "提交企业", field: "tenantName", width: 160 },
{ label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME },
{ label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
],
......@@ -73,7 +79,7 @@ const tableInfo = ref({
fixed: 'right',
btns: (scope) => {
return [{
label: "编辑", value: "edit", click: (scope) => {
label: "编辑", value: "edit", disabled: !isDataProvider && scope.row.dataOwnership == '1', click: (scope) => {
router.push({
name: 'anonTaskCreate',
query: {
......@@ -105,7 +111,7 @@ const tableInfo = ref({
});
}
}, {
label: "删除", value: "delete", click: (scope) => {
label: "删除", value: "delete", disabled: !isDataProvider && scope.row.dataOwnership == '1', click: (scope) => {
proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => {
let guids = [scope.row.guid];
deleteAnonTask(guids).then((res: any) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!