| | |
| | | <span>{{ scope.row.modifieddate | parseTime('{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | width="100" |
| | | class-name="small-padding fixed-width" |
| | | v-if="isAdmin" |
| | | ><template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | | :disabled="scope.row.ismend == 1" |
| | | @click="markSolved(scope.row)" |
| | | >标记已处理</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br> |
| | | <el-pagination |
| | |
| | | |
| | | <script> |
| | | import { mapGetters } from 'vuex' |
| | | import { getStockWarningList } from '@/api/warning' |
| | | import { getStockWarningList, setSolved } from '@/api/warning' |
| | | import { parseTime, computePageCount } from '@/utils' |
| | | import { parseError } from '@/utils/messageDialog' |
| | | import Cookies from 'js-cookie' |
| | |
| | | } |
| | | ], |
| | | dateRange: [], |
| | | isAdmin: false, |
| | | pickClear:false, |
| | | pickerOptions: { |
| | | shortcuts: [{ |
| | |
| | | this.getProvince(); |
| | | this.getDictionaryEnterpriseType(); |
| | | this.getCertWarningList(); |
| | | const roles = JSON.parse(Cookies.get('roles')) |
| | | if(roles.find(i=>i.name == '管理员'|| i.name == '监管部门')){ |
| | | this.isAdmin = true |
| | | }else{ |
| | | this.isAdmin = false |
| | | } |
| | | }, |
| | | methods: { |
| | | setDateRange(){ |
| | |
| | | this.currentPage = val |
| | | this.getCertWarningList() |
| | | }, |
| | | markSolved(row){ |
| | | MessageBox.confirm('确定将该数据标记为已处理', '标记已处理', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const res = await setSolved({id: row.id}) |
| | | if(res.data.code === "200"){ |
| | | this.$message({ |
| | | type:'success', |
| | | message: '标记成功' |
| | | }) |
| | | this.getCertWarningList() |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | console.log('已取消') |
| | | }) |
| | | |
| | | }, |
| | | getBtnPermission(btnType) { |
| | | return checkBtnPermission(this.userType, btnType) |
| | | }, |