| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="isAdmin"> |
| | | <el-form-item label="年份:" style="margin-left: 20px"> |
| | | <el-date-picker |
| | | v-model="data.queryParams.year" |
| | | type="year" |
| | | value-format="YYYY" |
| | | placeholder="请选择年份" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getList">查询</el-button> |
| | | <el-button type="primary" plain @click="reset">重置</el-button> |
| | | </el-form-item> |
| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80"/> |
| | | <el-table-column label="年份" prop="year" align="center"/> |
| | | <el-table-column label="规范" prop="fileNameSimple" align="center"/> |
| | | <el-table-column label="文件" prop="fileName" align="center"> |
| | | <template #default="scope"> |
| | |
| | | companyId: null, |
| | | industryType: null, |
| | | type: '', |
| | | templateName: '' |
| | | templateName: '', |
| | | year:'' |
| | | }, |
| | | total: 0, |
| | | dataList: [], |
| | |
| | | data.isAdmin = false |
| | | data.queryParams.companyId = userStore.companyId |
| | | } |
| | | await getNowYear() |
| | | await getList() |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const getNowYear = () =>{ |
| | | data.queryParams.year = new Date().getFullYear().toString() |
| | | } |
| | | const openFile = async(path)=>{ |
| | | const ext = path.split('.').pop().toLowerCase(); |
| | | if (ext === 'doc' || ext === 'xls' || ext === 'xlsx' || ext === 'ppt' || ext === 'pptx') { |
| | |
| | | companyId: null, |
| | | industryType: null, |
| | | type: '', |
| | | templateName: '' |
| | | templateName: '', |
| | | year:'' |
| | | } |
| | | await getCompanyList() |
| | | }else { |
| | |
| | | companyId: data.queryParams.companyId, |
| | | industryType: null, |
| | | type: '', |
| | | templateName: '' |
| | | templateName: '', |
| | | year:'' |
| | | } |
| | | } |
| | | await getNowYear() |
| | | await getList() |
| | | } |
| | | |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |