From 4ec99055f730525599c60c5cf1b035c8142dd66c Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Tue, 03 Feb 2026 08:45:51 +0800
Subject: [PATCH] 修改
---
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue
index b94bc44..341416a 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue
@@ -44,8 +44,9 @@
<el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + scope.row.format}}</el-link>
</template>
</el-table-column>
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template #default="scope">
+ <el-button link type="danger" @click="toTop(scope.row)" >置顶</el-button>
<el-button link type="primary" @click="downloadFile(scope.row.filePath)" v-hasPermi="['recordStandard:view']">下载</el-button>
<el-button link type="primary" @click="openDialog('edit',scope.row)" v-hasPermi="['recordStandard:update']">编辑</el-button>
<el-button link type="danger" @click="handleDelete(scope.row)" v-hasPermi="['recordStandard:update']">删除</el-button>
@@ -72,9 +73,10 @@
import Cookies from "js-cookie";
import editDialog from './components/editDialog.vue'
import useUserStore from "@/store/modules/user";
-import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys";
+import {getStandardTemp, delStandardTemp, templateToTop} from "@/api/standardSys/standardSys";
import { renderAsync } from "docx-preview";
-
+import router from "@/router";
+import {useRoute} from "vue-router";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -93,7 +95,7 @@
companyList: [],
isAdmin: false
});
-
+const route = useRoute();
const { queryParams, total, dataList,companyList, isAdmin } = toRefs(data);
const userInfo = ref()
onMounted(async ()=>{
@@ -103,6 +105,9 @@
}else{
data.isAdmin = false
data.queryParams.companyId = userStore.companyId
+ }
+ if(route.query.templateName){
+ data.queryParams.templateName = route.query.templateName
}
await getList()
})
@@ -233,6 +238,25 @@
}
})
}
+const toTop = (val) => {
+ ElMessageBox.confirm(
+ '确定置顶此条数据?',
+ '提示',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ })
+ .then( async() => {
+ const res = await templateToTop(val.id)
+ if(res.code == 200){
+ ElMessage.success('置顶成功')
+ await getList()
+ }else{
+ ElMessage.warning(res.message)
+ }
+ })
+}
const handleSortChange = (val) => {
console.log('bal',val)
if(val.order === 'ascending' ){
--
Gitblit v1.9.2