| | |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | v-hasPermi="['appStandard:update']" |
| | | >新增</el-button> |
| | | </el-form-item> |
| | | <el-form-item v-if="isAdmin" label="单位:" > |
| | |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} 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); |
| | |
| | | companyList: [], |
| | | isAdmin: false |
| | | }); |
| | | |
| | | const route = useRoute(); |
| | | const { queryParams, total, dataList,companyList, isAdmin } = toRefs(data); |
| | | const userInfo = ref() |
| | | onMounted(async ()=>{ |
| | |
| | | }else{ |
| | | data.isAdmin = false |
| | | data.queryParams.companyId = userStore.companyId |
| | | } |
| | | if(route.query.templateName){ |
| | | data.queryParams.templateName = route.query.templateName |
| | | } |
| | | await getList() |
| | | }) |
| | |
| | | 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('取消预览') |