多体系建设信息化条统-前端
zhouwx
2026-02-02 ea6f80179c8c45d743d45aa02e54640aad6355f7
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue
@@ -8,6 +8,7 @@
              plain
              icon="Plus"
              @click="openDialog('add',{})"
              v-hasPermi="['appStandard:update']"
          >新增</el-button>
        </el-form-item>
        <el-form-item v-if="isAdmin" label="单位:" >
@@ -40,8 +41,9 @@
        </template>
      </el-table-column>
      <el-table-column label="行业" prop="industryTypeName" header-align="center" align="left"/>
      <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="['appStandard:view']">下载</el-button>
          <el-button link type="primary" @click="openDialog('edit',scope.row)" v-hasPermi="['appStandard:update']">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)" v-hasPermi="['appStandard:update']">删除</el-button>
@@ -68,7 +70,7 @@
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";
@@ -141,7 +143,7 @@
const openFile = async(path)=>{
  const ext = path.split('.').pop().toLowerCase();
  if (ext === 'doc' || ext === 'xlsx' || ext === 'xls') {
    ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
    ElMessageBox.confirm('暂不支持线上预览.doc、.xls、.xlsx文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
      window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
    }).catch(() => {
      console.log('取消预览')
@@ -229,6 +231,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' ){