控制运营方按钮
Showing
2 changed files
with
21 additions
and
7 deletions
| ... | @@ -12,7 +12,7 @@ import { | ... | @@ -12,7 +12,7 @@ import { |
| 12 | import { changeNum, download } from '@/utils/common'; | 12 | import { changeNum, download } from '@/utils/common'; |
| 13 | import { ElMessage } from 'element-plus'; | 13 | import { ElMessage } from 'element-plus'; |
| 14 | import anonResultAnalysis from './components/anonResultAnalysis.vue'; | 14 | import anonResultAnalysis from './components/anonResultAnalysis.vue'; |
| 15 | import { commonPageConfig } from '@/utils/enum'; | 15 | import { commonPageConfig, USERROLE } from '@/utils/enum'; |
| 16 | import { calcColumnWidth } from '@/utils'; | 16 | import { calcColumnWidth } from '@/utils'; |
| 17 | import html2canvas from 'html2canvas'; | 17 | import html2canvas from 'html2canvas'; |
| 18 | 18 | ||
| ... | @@ -23,6 +23,11 @@ const taskGuid = ref(route.query.guid); | ... | @@ -23,6 +23,11 @@ const taskGuid = ref(route.query.guid); |
| 23 | const { proxy } = getCurrentInstance() as any; | 23 | const { proxy } = getCurrentInstance() as any; |
| 24 | const resultDataLoading = ref(false); | 24 | const resultDataLoading = ref(false); |
| 25 | 25 | ||
| 26 | /** 是否是数据提供方 */ | ||
| 27 | const isDataProvider = computed(() => { | ||
| 28 | return localStorage.getItem('userRole') == USERROLE.PROVIDER; | ||
| 29 | }) | ||
| 30 | |||
| 26 | const downPromise: any = ref() | 31 | const downPromise: any = ref() |
| 27 | 32 | ||
| 28 | /** 提交保存和编辑后的执行guid */ | 33 | /** 提交保存和编辑后的执行guid */ |
| ... | @@ -253,12 +258,14 @@ onBeforeMount(() => { | ... | @@ -253,12 +258,14 @@ onBeforeMount(() => { |
| 253 | <template> | 258 | <template> |
| 254 | <div class="table_tool_wrap" v-loading="resultDataLoading" ref="containerRef" :element-loading-text="loadingText"> | 259 | <div class="table_tool_wrap" v-loading="resultDataLoading" ref="containerRef" :element-loading-text="loadingText"> |
| 255 | <!-- 连接器不需要显示下载报告按钮 --> | 260 | <!-- 连接器不需要显示下载报告按钮 --> |
| 256 | <!-- <el-button v-show="!isWordStyle" style="margin-bottom: 8px;" type="primary" @click="transfer" | 261 | <template v-if="!isDataProvider"> |
| 262 | <el-button v-show="!isWordStyle" style="margin-bottom: 8px;" type="primary" @click="transfer" | ||
| 257 | v-preReClick>生成Word评估报告</el-button> | 263 | v-preReClick>生成Word评估报告</el-button> |
| 258 | <div v-show="isWordStyle" style="margin-bottom: 8px;"> | 264 | <div v-show="isWordStyle" style="margin-bottom: 8px;"> |
| 259 | <el-button @click="isWordStyle = false">返回</el-button> | 265 | <el-button @click="isWordStyle = false">返回</el-button> |
| 260 | <el-button type="primary" @click="downloadWord">下载评估报告</el-button> | 266 | <el-button type="primary" @click="downloadWord">下载评估报告</el-button> |
| 261 | </div> --> | 267 | </div> |
| 268 | </template> | ||
| 262 | <anonResultAnalysis ref="resultReportRef" :show-title="true" :analysis-result-info="analysisResultInfo" | 269 | <anonResultAnalysis ref="resultReportRef" :show-title="true" :analysis-result-info="analysisResultInfo" |
| 263 | :isWordStyle="isWordStyle" :style="isWordStyle ? { | 270 | :isWordStyle="isWordStyle" :style="isWordStyle ? { |
| 264 | height: '100%', | 271 | height: '100%', |
| ... | @@ -269,7 +276,8 @@ onBeforeMount(() => { | ... | @@ -269,7 +276,8 @@ onBeforeMount(() => { |
| 269 | } : null" :analysis-result-loading="analysisResultLoading" | 276 | } : null" :analysis-result-loading="analysisResultLoading" |
| 270 | :analysis-result-table-fields="analysisResultTableFields" :old-anon-task-value-info="oldAnonTaskValueInfo" | 277 | :analysis-result-table-fields="analysisResultTableFields" :old-anon-task-value-info="oldAnonTaskValueInfo" |
| 271 | :container-width="containerWidth" :origin-result-table-field-column="originResultTableFieldColumn" | 278 | :container-width="containerWidth" :origin-result-table-field-column="originResultTableFieldColumn" |
| 272 | :page-info="pageInfo" :result-data="resultData" :fullResultData="fullResultData" @page-change="pageChange"></anonResultAnalysis> | 279 | :page-info="pageInfo" :result-data="resultData" :fullResultData="fullResultData" @page-change="pageChange"> |
| 280 | </anonResultAnalysis> | ||
| 273 | </div> | 281 | </div> |
| 274 | </template> | 282 | </template> |
| 275 | 283 | ... | ... |
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | <script lang="ts" setup name="resultProcess"> | 5 | <script lang="ts" setup name="resultProcess"> |
| 6 | import TableTools from "@/components/Tools/table_tools.vue"; | 6 | import TableTools from "@/components/Tools/table_tools.vue"; |
| 7 | import { commonPageConfig } from '@/components/PageNav/index'; | 7 | import { commonPageConfig } from '@/components/PageNav/index'; |
| 8 | import { TableColumnWidth } from "@/utils/enum"; | 8 | import { TableColumnWidth, USERROLE } from "@/utils/enum"; |
| 9 | import { | 9 | import { |
| 10 | dataSourceTypeList, | 10 | dataSourceTypeList, |
| 11 | getAnonTaskList, | 11 | getAnonTaskList, |
| ... | @@ -19,6 +19,11 @@ const router = useRouter() | ... | @@ -19,6 +19,11 @@ const router = useRouter() |
| 19 | const { proxy } = getCurrentInstance() as any; | 19 | const { proxy } = getCurrentInstance() as any; |
| 20 | const { required } = useValidator(); | 20 | const { required } = useValidator(); |
| 21 | 21 | ||
| 22 | /** 是否是数据提供方 */ | ||
| 23 | const isDataProvider = computed(() => { | ||
| 24 | return localStorage.getItem('userRole') == USERROLE.PROVIDER; | ||
| 25 | }) | ||
| 26 | |||
| 22 | const searchItemList = ref([{ | 27 | const searchItemList = ref([{ |
| 23 | type: "input", | 28 | type: "input", |
| 24 | label: "", | 29 | label: "", |
| ... | @@ -56,6 +61,7 @@ const tableInfo = ref({ | ... | @@ -56,6 +61,7 @@ const tableInfo = ref({ |
| 56 | }, | 61 | }, |
| 57 | { label: "任务状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" }, | 62 | { label: "任务状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" }, |
| 58 | { label: "导出时间", field: "exportTime", width: TableColumnWidth.DATETIME }, | 63 | { label: "导出时间", field: "exportTime", width: TableColumnWidth.DATETIME }, |
| 64 | { label: "提交企业", field: "tenantName", width: 160 }, | ||
| 59 | { label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME }, | 65 | { label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME }, |
| 60 | { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, | 66 | { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, |
| 61 | ], | 67 | ], |
| ... | @@ -73,7 +79,7 @@ const tableInfo = ref({ | ... | @@ -73,7 +79,7 @@ const tableInfo = ref({ |
| 73 | fixed: 'right', | 79 | fixed: 'right', |
| 74 | btns: (scope) => { | 80 | btns: (scope) => { |
| 75 | return [{ | 81 | return [{ |
| 76 | label: "编辑", value: "edit", click: (scope) => { | 82 | label: "编辑", value: "edit", disabled: !isDataProvider && scope.row.dataOwnership == '1', click: (scope) => { |
| 77 | router.push({ | 83 | router.push({ |
| 78 | name: 'anonTaskCreate', | 84 | name: 'anonTaskCreate', |
| 79 | query: { | 85 | query: { |
| ... | @@ -105,7 +111,7 @@ const tableInfo = ref({ | ... | @@ -105,7 +111,7 @@ const tableInfo = ref({ |
| 105 | }); | 111 | }); |
| 106 | } | 112 | } |
| 107 | }, { | 113 | }, { |
| 108 | label: "删除", value: "delete", click: (scope) => { | 114 | label: "删除", value: "delete", disabled: !isDataProvider && scope.row.dataOwnership == '1', click: (scope) => { |
| 109 | proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => { | 115 | proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => { |
| 110 | let guids = [scope.row.guid]; | 116 | let guids = [scope.row.guid]; |
| 111 | deleteAnonTask(guids).then((res: any) => { | 117 | deleteAnonTask(guids).then((res: any) => { | ... | ... |
-
Please register or sign in to post a comment