Merge branch 'master' of https://sinanoaq.cn:8888/r/ztqt
| | |
| | | import request from '@/utils/request' |
| | | import { getToken } from '@/utils/auth' |
| | | |
| | | //换取账号 |
| | | export function getAccount(data) { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/getAccount', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function loginByUsername(data) { |
| | | return request({ |
| | | headers: { |
| | |
| | | }) |
| | | } |
| | | |
| | | export function getUserInfo(token) { |
| | | export function getUserInfo() { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/auth/verify', |
| | | method: 'get', |
| | | data: { 'token': token, 'action': 'getUserInfo' } |
| | | data: { 'token': getToken(), 'action': 'getUserInfo' } |
| | | }) |
| | | } |
| | | |
| | |
| | | const hiddenDangerToken = 'hiddenDangerToken' |
| | | const hiddenDangerVerify = 'hiddenDangerVerify' |
| | | |
| | | const hiddenDangerUsername = 'hiddenDangerUsername' |
| | | const hiddenDangerPassword = 'hiddenDangerPassword' |
| | | |
| | | export function getTokenAndVerify() { |
| | | let token=Cookies.get(hiddenDangerToken) |
| | | let verify=Cookies.get(hiddenDangerVerify) |
| | |
| | | } |
| | | |
| | | export function setTokenAndVerify() { |
| | | let username=Cookies.get(hiddenDangerUsername) ? Cookies.get(hiddenDangerUsername) : baseInfo.username |
| | | let password=Cookies.get(hiddenDangerPassword) ? Cookies.get(hiddenDangerPassword) : baseInfo.password |
| | | $.ajax({ |
| | | url:"/taboi/account/login_do?username="+baseInfo.username+"&password="+baseInfo.password+"&key="+baseInfo.key, |
| | | // url: "/taboi/account/login_do?username="+baseInfo.username+"&password="+baseInfo.password+"&key="+baseInfo.key, |
| | | url: "/taboi/account/login_do?username="+username+"&password="+password+"&key="+baseInfo.key, |
| | | type: "GET", |
| | | contentType: "multipart/form-data", |
| | | async: false, |
| | |
| | | return request({ |
| | | headers:{ |
| | | 'token': getTokenAndVerify().token, |
| | | 'verify':getTokenAndVerify().verify |
| | | 'verify':getTokenAndVerify().verify, |
| | | }, |
| | | url: "/taboi/danger/focus_list", |
| | | contentType: "application/json", |
| | |
| | | method: 'POST', |
| | | }); |
| | | } |
| | | //导出 |
| | | export function analogy_export_do(data) { |
| | | return request({ |
| | | headers: { |
| | | 'token': getTokenAndVerify().token, |
| | | 'verify': getTokenAndVerify().verify |
| | | }, |
| | | url: '/taboi/excel/danger_export_do', |
| | | method: 'POST', |
| | | responseType: 'arraybuffer', |
| | | data |
| | | }); |
| | | } |
| | | //下载模板 |
| | | export function downloadFile(params) { |
| | | return request({ |
| | | headers: { |
| | | 'token': getTokenAndVerify().token, |
| | | 'verify': getTokenAndVerify().verify |
| | | }, |
| | | url: '/taboi/download/danger_template', |
| | | method: 'GET', |
| | | contentType: "multipart/form-data", |
| | | responseType:'blob', |
| | | params:params?params:{} |
| | | }); |
| | | } |
| | | //导入 |
| | | export function danger_import_do(data) { |
| | | return request({ |
| | | headers: { |
| | | 'token': getTokenAndVerify().token, |
| | | 'verify': getTokenAndVerify().verify |
| | | }, |
| | | url: '/taboi/excel/danger_import_do', |
| | | contentType: "multipart/form-data", |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | |
| | | return request({ |
| | | headers:{ |
| | | 'token': getTokenAndVerify().token, |
| | | 'verify':getTokenAndVerify().verify |
| | | 'verify':getTokenAndVerify().verify, |
| | | }, |
| | | url: "/taboi/danger/major_list", |
| | | contentType: "application/json", |
| | |
| | | method: 'POST', |
| | | }); |
| | | } |
| | | //导出 |
| | | export function analogy_export_do(data) { |
| | | return request({ |
| | | headers: { |
| | | 'token': getTokenAndVerify().token, |
| | | 'verify': getTokenAndVerify().verify |
| | | }, |
| | | url: '/taboi/excel/danger_export_do', |
| | | method: 'POST', |
| | | responseType: 'arraybuffer', |
| | | data |
| | | }); |
| | | } |
| | |
| | | { |
| | | path: '/', |
| | | component: Layout, |
| | | redirect: '/specialWorkManage/index/specialWorkManage/workPlan/index/specialWorkManage/workPlan/reserve', |
| | | redirect: "/specialWorkManage/index/specialWorkManage/workPlan/index/specialWorkManage/workPlan/reserve", |
| | | // redirect: '/workPlan/workPlan/reserve', |
| | | children: [ |
| | | { |
| | | path: 'dashboard', |
| | | component: () => import('@/views/specialWorkManage/workPlan/reserve'), |
| | | component: () => import('@/views/workPlan/reserve'), |
| | | name: 'Dashboard1', |
| | | meta: { title: '首页', icon: 'el-icon-dash', noCache: true, affix: true } |
| | | } |
| | |
| | | // ], |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: 'dashboard', |
| | | // component: Layout, |
| | | // redirect: 'dashboard', |
| | | // children: [ |
| | | // { |
| | | // path: 'dashboard', |
| | | // component: () => import('@/views/dashboard/index'), |
| | | // name: 'Dashboard1', |
| | | // meta: { title: '首页', icon: 'el-icon-dash', noCache: true, affix: true } |
| | | // } |
| | | // |
| | | // ], |
| | | // hidden: true |
| | | // }, |
| | | { |
| | | path: 'dashboard', |
| | | component: Layout, |
| | | redirect: 'dashboard', |
| | | children: [ |
| | | { |
| | | path: 'dashboard', |
| | | component: () => import('@/views/dashboard/index'), |
| | | name: 'Dashboard1', |
| | | meta: { title: '首页', icon: 'el-icon-dash', noCache: true, affix: true } |
| | | } |
| | | |
| | | ], |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 2, |
| | | // parentId: 0, |
| | |
| | | }, |
| | | ] |
| | | },*/ |
| | | { |
| | | id: 2, |
| | | parentId: 0, |
| | | path: '/sgyhpczl', |
| | | component: Layout, |
| | | name: '事故隐患排查治理', |
| | | meta: { title: '事故隐患排查治理', icon: 'el-icon-facilities' }, |
| | | hidden: true, |
| | | children: [ |
| | | // { |
| | | // id: 1, |
| | | // parentId: 0, |
| | | // path: '/majorHidden', |
| | | // name: '重大隐患整改进度', |
| | | // component: () => import('@/views/accidentHidden/majorHidden'), |
| | | // meta: { title: '重大隐患整改进度', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/fillProgress', |
| | | // name: '重大隐患整改进度-填写进度', |
| | | component: () => import('@/views/accidentHidden/fillProgress'), |
| | | // meta: { title: '重大隐患整改进度-填写进度', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 2, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerRegistration', |
| | | // name: '隐患登记下达', |
| | | // component: () => import('@/views/hiddenDangerRegistration'), |
| | | // meta: { title: '隐患登记下达', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/hiddenDangerAdd', |
| | | // name: '新增', |
| | | component: () => import('@/views/hiddenDangerRegistration/hiddenDangerAdd'), |
| | | // meta: { title: '隐患登记下达-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/hiddenDangerList', |
| | | // name: '隐患登记下达-发送隐患单', |
| | | component: () => import('@/views/hiddenDangerRegistration/hiddenDangerList'), |
| | | // meta: { title: '隐患登记下达-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/listAssociatedHazards', |
| | | // name: '隐患登记下达-关联危险源-列表页面', |
| | | component: () => import('@/views/hiddenDangerRegistration/listAssociatedHazards'), |
| | | // meta: { title: '隐患登记下达-关联危险源-列表页面', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/reboundHiddenDanger', |
| | | // name: '风险预控-重复反弹隐患-列表页面', |
| | | component: () => import('@/views/hiddenDangerRegistration/reboundHiddenDanger'), |
| | | // meta: { title: '风险预控-重复反弹隐患-列表页面', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 3, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerRectification', |
| | | // name: '隐患整改治理', |
| | | // component: () => import('@/views/hiddenDangerRectification'), |
| | | // meta: { title: '隐患整改治理', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/sendHiddenDangerList', |
| | | // name: '隐患整改治理-发送隐患单', |
| | | component: () => import('@/views/hiddenDangerRectification/sendHiddenDangerList'), |
| | | // meta: { title: '隐患整改治理-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/applicationForExtension', |
| | | // name: '隐患整改治理-申请延期', |
| | | component: () => import('@/views/hiddenDangerRectification/applicationForExtension'), |
| | | // meta: { title: '隐患整改治理-申请延期', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 4, |
| | | // parentId: 0, |
| | | // path: '/recheckCancellationNumber', |
| | | // name: '隐患复查销号', |
| | | // component: () => import('@/views/hiddenDangerReview/recheckCancellationNumber'), |
| | | // meta: { title: '隐患复查销号', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/recheckHiddenDangerList', |
| | | // name: '隐患复查销号-发送隐患单', |
| | | component: () => import('@/views/hiddenDangerReview/recheckHiddenDangerList'), |
| | | // meta: { title: '隐患复查销号-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 5, |
| | | // parentId: 0, |
| | | // path: '/delayHiddenDangerRectification', |
| | | // name: '隐患整改延期', |
| | | // component: () => import('@/views/delayHiddenDangerRectification'), |
| | | // meta: { title: '隐患整改延期', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/rectificationDelayHiddenDanger', |
| | | // name: '隐患整改延期-发送隐患单', |
| | | component: () => import('@/views/delayHiddenDangerRectification/rectificationDelayHiddenDanger'), |
| | | // meta: { title: '隐患整改延期-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 6, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerManagement', |
| | | // name: '自查隐患管理', |
| | | // component: () => import('@/views/hiddenDangerManagement'), |
| | | // meta: { title: '自查隐患管理', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/fillRectificationAdd', |
| | | // name: '自查隐患管理-填写整改', |
| | | component: () => import('@/views/hiddenDangerManagement/fillRectificationAdd'), |
| | | // meta: { title: '自查隐患管理-填写整改', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/fillRectification', |
| | | // name: '自查隐患管理-填写整改', |
| | | component: () => import('@/views/hiddenDangerManagement/fillRectification'), |
| | | // meta: { title: '自查隐患管理-填写整改', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/fillInspector', |
| | | // name: '自查隐患管理-填写督察', |
| | | component: () => import('@/views/hiddenDangerManagement/fillInspector'), |
| | | // meta: { title: '自查隐患管理-填写督察', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 7, |
| | | // parentId: 0, |
| | | // path: '/oneFromanother', |
| | | // name: '举一反三隐患', |
| | | // component: () => import('@/views/oneFromanother'), |
| | | // meta: { title: '举一反三隐患', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/manage', |
| | | component: () => import('@/views/oneFromanother/manage'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/exist', |
| | | component: () => import('@/views/oneFromanother/exist'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/inspectionNotExist', |
| | | // name: '举一反三-待自查-不存在', |
| | | component: () => import('@/views/oneFromanother/inspectionNotExist'), |
| | | // meta: { title: '举一反三-待自查-不存在', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/send', |
| | | // name: '内部举一反三-发送弹窗', |
| | | component: () => import('@/views/oneFromanother/send'), |
| | | // meta: { title: '内部举一反三-发送弹窗', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 8, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerTroubleshootingList', |
| | | // name: '隐患排查清单', |
| | | // component: () => import('@/views/hiddenDangerTroubleshootingList'), |
| | | // meta: { title: '隐患排查清单', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/preview', |
| | | // name: '隐患排查清单-预览', |
| | | component: () => import('@/views/hiddenDangerTroubleshootingList/preview'), |
| | | // meta: { title: '隐患排查清单-预览', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 9, |
| | | // parentId: 0, |
| | | // path: '/Issuedbysuperiors', |
| | | // name: '上级下达隐患', |
| | | // component: () => import('@/views/Issuedbysuperiors'), |
| | | // meta: { title: '上级下达隐患', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 10, |
| | | // parentId: 0, |
| | | // path: '/oneFromanotherN', |
| | | // name: '内部举一反三', |
| | | // component: () => import('@/views/oneFromanotherN'), |
| | | // meta: { title: '内部举一反三', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/addDanger', |
| | | component: () => import('@/views/oneFromanotherN/addDanger'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/existN', |
| | | component: () => import('@/views/oneFromanotherN/existN'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/superiorsSend', |
| | | // name: '上级下达隐患-点击发送', |
| | | component: () => import('@/views/Issuedbysuperiors/superiorsSend'), |
| | | // meta: { title: '上级下达隐患-点击发送', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 10, |
| | | // parentId: 0, |
| | | // path: '/summaryPotentialSafetyHzards', |
| | | // name: '安全隐患汇总', |
| | | // component: () => import('@/views/summaryPotentialSafetyHzards'), |
| | | // meta: { title: '安全隐患汇总', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 11, |
| | | // parentId: 0, |
| | | // path: '/safetyHazardAccount', |
| | | // name: '安全隐患台账', |
| | | // component: () => import('@/views/safetyHazardAccount'), |
| | | // meta: { title: '安全隐患台账', icon: '' } |
| | | // }, |
| | | { |
| | | path: '/accountSend', |
| | | // name: '安全隐患台账-查看隐患单', |
| | | component: () => import('@/views/safetyHazardAccount/accountSend'), |
| | | // meta: { title: '安全隐患台账-查看隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/hazardSource', |
| | | // name: '安全隐患台账-关联危险源', |
| | | component: () => import('@/views/safetyHazardAccount/hazardSource'), |
| | | // meta: { title: '安全隐患台账-关联危险源', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/safetyedit', |
| | | // name: '安全隐患台账-编辑', |
| | | component: () => import('@/views/safetyHazardAccount/safetyedit'), |
| | | // meta: { title: '安全隐患台账-编辑', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/Dualbase', |
| | | // name: '安全隐患台账-双基考核', |
| | | component: () => import('@/views/safetyHazardAccount/Dualbase'), |
| | | // meta: { title: '安全隐患台账-编辑', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/DualbaseLost', |
| | | // name: '安全隐患台账-双基考核', |
| | | component: () => import('@/views/safetyHazardAccount/DualbaseLost'), |
| | | // meta: { title: '安全隐患台账-编辑', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/supervision', |
| | | // name: '安全隐患台账-督查督办', |
| | | component: () => import('@/views/safetyHazardAccount/supervision'), |
| | | // meta: { title: '安全隐患台账-督查督办', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/inferOtherThings', |
| | | // name: '安全隐患台账-举一反三', |
| | | component: () => import('@/views/safetyHazardAccount/inferOtherThings'), |
| | | // meta: { title: '安全隐患台账-举一反三', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/summaryList', |
| | | // name: '安全隐患台账-举一反三', |
| | | component: () => import('@/views/summaryPotentialSafetyHzards/summaryList'), |
| | | // meta: { title: '安全隐患台账-举一反三', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/summaryForm', |
| | | // name: '安全隐患汇总-发送隐患单', |
| | | component: () => import('@/views/summaryPotentialSafetyHzards/summaryForm'), |
| | | // meta: { title: '安全隐患汇总-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/dangerDetails', |
| | | // name: '安全隐患汇总-发送隐患单', |
| | | component: () => import('@/views/dangerDetails/dnagerDetails'), |
| | | // meta: { title: '安全隐患汇总-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | // { |
| | | // id: 12, |
| | | // parentId: 0, |
| | | // path: '/chartAnalysis', |
| | | // name: '隐患图表分析', |
| | | // component: () => import('@/views/chartAnalysis'), |
| | | // meta: { title: '隐患图表分析', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 13, |
| | | // parentId: 0, |
| | | // path: '/careabout', |
| | | // name: '您关注的隐患', |
| | | // component: () => import('@/views/careabout'), |
| | | // meta: { title: '您关注的隐患', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 14, |
| | | // parentId: 0, |
| | | // path: '/troubleshooting', |
| | | // name: '隐患排查会议', |
| | | // component: () => import('@/views/troubleshooting'), |
| | | // meta: { title: '隐患排查会议', icon: '' } |
| | | // }, |
| | | ] |
| | | } |
| | | // { |
| | | // id: 2, |
| | | // parentId: 0, |
| | | // hidden: true, |
| | | // path: '/accidentHidden', |
| | | // component: Layout, |
| | | // name: '事故隐患排查治理', |
| | | // meta: { title: '事故隐患排查治理', icon: 'el-icon-facilities' }, |
| | | // children: [ |
| | | // { |
| | | // id: 1, |
| | | // parentId: 0, |
| | | // path: '/majorHidden', |
| | | // name: '重大隐患整改进度', |
| | | // component: () => import('@/views/accidentHidden/majorHidden'), |
| | | // meta: { title: '重大隐患整改进度', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/fillProgress', |
| | | // // name: '重大隐患整改进度-填写进度', |
| | | // component: () => import('@/views/accidentHidden/fillProgress'), |
| | | // // meta: { title: '重大隐患整改进度-填写进度', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 2, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerRegistration', |
| | | // name: '隐患登记下达', |
| | | // component: () => import('@/views/hiddenDangerRegistration'), |
| | | // meta: { title: '隐患登记下达', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/hiddenDangerAdd', |
| | | // // name: '新增', |
| | | // component: () => import('@/views/hiddenDangerRegistration/hiddenDangerAdd'), |
| | | // // meta: { title: '隐患登记下达-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/hiddenDangerList', |
| | | // // name: '隐患登记下达-发送隐患单', |
| | | // component: () => import('@/views/hiddenDangerRegistration/hiddenDangerList'), |
| | | // // meta: { title: '隐患登记下达-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/listAssociatedHazards', |
| | | // // name: '隐患登记下达-关联危险源-列表页面', |
| | | // component: () => import('@/views/hiddenDangerRegistration/listAssociatedHazards'), |
| | | // // meta: { title: '隐患登记下达-关联危险源-列表页面', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/reboundHiddenDanger', |
| | | // // name: '风险预控-重复反弹隐患-列表页面', |
| | | // component: () => import('@/views/hiddenDangerRegistration/reboundHiddenDanger'), |
| | | // // meta: { title: '风险预控-重复反弹隐患-列表页面', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 3, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerRectification', |
| | | // name: '隐患整改治理', |
| | | // component: () => import('@/views/hiddenDangerRectification'), |
| | | // meta: { title: '隐患整改治理', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/sendHiddenDangerList', |
| | | // // name: '隐患整改治理-发送隐患单', |
| | | // component: () => import('@/views/hiddenDangerRectification/sendHiddenDangerList'), |
| | | // // meta: { title: '隐患整改治理-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/applicationForExtension', |
| | | // // name: '隐患整改治理-申请延期', |
| | | // component: () => import('@/views/hiddenDangerRectification/applicationForExtension'), |
| | | // // meta: { title: '隐患整改治理-申请延期', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 4, |
| | | // parentId: 0, |
| | | // path: '/recheckCancellationNumber', |
| | | // name: '隐患复查销号', |
| | | // component: () => import('@/views/hiddenDangerReview/recheckCancellationNumber'), |
| | | // meta: { title: '隐患复查销号', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/recheckHiddenDangerList', |
| | | // // name: '隐患复查销号-发送隐患单', |
| | | // component: () => import('@/views/hiddenDangerReview/recheckHiddenDangerList'), |
| | | // // meta: { title: '隐患复查销号-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 5, |
| | | // parentId: 0, |
| | | // path: '/delayHiddenDangerRectification', |
| | | // name: '隐患整改延期', |
| | | // component: () => import('@/views/delayHiddenDangerRectification'), |
| | | // meta: { title: '隐患整改延期', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/rectificationDelayHiddenDanger', |
| | | // // name: '隐患整改延期-发送隐患单', |
| | | // component: () => import('@/views/delayHiddenDangerRectification/rectificationDelayHiddenDanger'), |
| | | // // meta: { title: '隐患整改延期-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 6, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerManagement', |
| | | // name: '自查隐患管理', |
| | | // component: () => import('@/views/hiddenDangerManagement'), |
| | | // meta: { title: '自查隐患管理', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/fillRectificationAdd', |
| | | // // name: '自查隐患管理-填写整改', |
| | | // component: () => import('@/views/hiddenDangerManagement/fillRectificationAdd'), |
| | | // // meta: { title: '自查隐患管理-填写整改', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/fillRectification', |
| | | // // name: '自查隐患管理-填写整改', |
| | | // component: () => import('@/views/hiddenDangerManagement/fillRectification'), |
| | | // // meta: { title: '自查隐患管理-填写整改', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/fillInspector', |
| | | // // name: '自查隐患管理-填写督察', |
| | | // component: () => import('@/views/hiddenDangerManagement/fillInspector'), |
| | | // // meta: { title: '自查隐患管理-填写督察', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 7, |
| | | // parentId: 0, |
| | | // path: '/oneFromanother', |
| | | // name: '举一反三隐患', |
| | | // component: () => import('@/views/oneFromanother'), |
| | | // meta: { title: '举一反三隐患', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/manage', |
| | | // component: () => import('@/views/oneFromanother/manage'), |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/exist', |
| | | // component: () => import('@/views/oneFromanother/exist'), |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/inspectionNotExist', |
| | | // // name: '举一反三-待自查-不存在', |
| | | // component: () => import('@/views/oneFromanother/inspectionNotExist'), |
| | | // // meta: { title: '举一反三-待自查-不存在', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/send', |
| | | // // name: '内部举一反三-发送弹窗', |
| | | // component: () => import('@/views/oneFromanother/send'), |
| | | // // meta: { title: '内部举一反三-发送弹窗', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 8, |
| | | // parentId: 0, |
| | | // path: '/hiddenDangerTroubleshootingList', |
| | | // name: '隐患排查清单', |
| | | // component: () => import('@/views/hiddenDangerTroubleshootingList'), |
| | | // meta: { title: '隐患排查清单', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/preview', |
| | | // // name: '隐患排查清单-预览', |
| | | // component: () => import('@/views/hiddenDangerTroubleshootingList/preview'), |
| | | // // meta: { title: '隐患排查清单-预览', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 9, |
| | | // parentId: 0, |
| | | // path: '/Issuedbysuperiors', |
| | | // name: '上级下达隐患', |
| | | // component: () => import('@/views/Issuedbysuperiors'), |
| | | // meta: { title: '上级下达隐患', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 10, |
| | | // parentId: 0, |
| | | // path: '/oneFromanotherN', |
| | | // name: '内部举一反三', |
| | | // component: () => import('@/views/oneFromanotherN'), |
| | | // meta: { title: '内部举一反三', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/addDanger', |
| | | // component: () => import('@/views/oneFromanotherN/addDanger'), |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/existN', |
| | | // component: () => import('@/views/oneFromanotherN/existN'), |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/superiorsSend', |
| | | // // name: '上级下达隐患-点击发送', |
| | | // component: () => import('@/views/Issuedbysuperiors/superiorsSend'), |
| | | // // meta: { title: '上级下达隐患-点击发送', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 10, |
| | | // parentId: 0, |
| | | // path: '/summaryPotentialSafetyHzards', |
| | | // name: '安全隐患汇总', |
| | | // component: () => import('@/views/summaryPotentialSafetyHzards'), |
| | | // meta: { title: '安全隐患汇总', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 11, |
| | | // parentId: 0, |
| | | // path: '/safetyHazardAccount', |
| | | // name: '安全隐患台账', |
| | | // component: () => import('@/views/safetyHazardAccount'), |
| | | // meta: { title: '安全隐患台账', icon: '' } |
| | | // }, |
| | | // { |
| | | // path: '/accountSend', |
| | | // // name: '安全隐患台账-查看隐患单', |
| | | // component: () => import('@/views/safetyHazardAccount/accountSend'), |
| | | // // meta: { title: '安全隐患台账-查看隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/hazardSource', |
| | | // // name: '安全隐患台账-关联危险源', |
| | | // component: () => import('@/views/safetyHazardAccount/hazardSource'), |
| | | // // meta: { title: '安全隐患台账-关联危险源', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/safetyedit', |
| | | // // name: '安全隐患台账-编辑', |
| | | // component: () => import('@/views/safetyHazardAccount/safetyedit'), |
| | | // // meta: { title: '安全隐患台账-编辑', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/Dualbase', |
| | | // // name: '安全隐患台账-双基考核', |
| | | // component: () => import('@/views/safetyHazardAccount/Dualbase'), |
| | | // // meta: { title: '安全隐患台账-编辑', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/DualbaseLost', |
| | | // // name: '安全隐患台账-双基考核', |
| | | // component: () => import('@/views/safetyHazardAccount/DualbaseLost'), |
| | | // // meta: { title: '安全隐患台账-编辑', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/supervision', |
| | | // // name: '安全隐患台账-督查督办', |
| | | // component: () => import('@/views/safetyHazardAccount/supervision'), |
| | | // // meta: { title: '安全隐患台账-督查督办', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/inferOtherThings', |
| | | // // name: '安全隐患台账-举一反三', |
| | | // component: () => import('@/views/safetyHazardAccount/inferOtherThings'), |
| | | // // meta: { title: '安全隐患台账-举一反三', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/summaryList', |
| | | // // name: '安全隐患台账-举一反三', |
| | | // component: () => import('@/views/summaryPotentialSafetyHzards/summaryList'), |
| | | // // meta: { title: '安全隐患台账-举一反三', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/summaryForm', |
| | | // // name: '安全隐患汇总-发送隐患单', |
| | | // component: () => import('@/views/summaryPotentialSafetyHzards/summaryForm'), |
| | | // // meta: { title: '安全隐患汇总-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // path: '/dangerDetails', |
| | | // // name: '安全隐患汇总-发送隐患单', |
| | | // component: () => import('@/views/dangerDetails/dnagerDetails'), |
| | | // // meta: { title: '安全隐患汇总-发送隐患单', icon: '' } |
| | | // hidden: true |
| | | // }, |
| | | // { |
| | | // id: 12, |
| | | // parentId: 0, |
| | | // path: '/chartAnalysis', |
| | | // name: '隐患图表分析', |
| | | // component: () => import('@/views/chartAnalysis'), |
| | | // meta: { title: '隐患图表分析', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 13, |
| | | // parentId: 0, |
| | | // path: '/careabout', |
| | | // name: '您关注的隐患', |
| | | // component: () => import('@/views/careabout'), |
| | | // meta: { title: '您关注的隐患', icon: '' } |
| | | // }, |
| | | // { |
| | | // id: 14, |
| | | // parentId: 0, |
| | | // path: '/troubleshooting', |
| | | // name: '隐患排查会议', |
| | | // component: () => import('@/views/troubleshooting'), |
| | | // meta: { title: '隐患排查会议', icon: '' } |
| | | // }, |
| | | // ] |
| | | // } |
| | | ] |
| | | |
| | | export default new Router({ |
| | |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="Remark " |
| | | prop="Remark" |
| | | label="备注" |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="type!=1" |
| | | label="操作" |
| | | align="center" |
| | | width="200"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-button @click="returnIndex">返回</el-button> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="dialogVisible" |
| | |
| | | }) |
| | | this.clickCellMap[id] = [] |
| | | }, |
| | | returnIndex(){ |
| | | this.$router.push({ |
| | | path:"/accidentHidden/accidentHidden/majorHidden" |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | v-for="item in YHBMList" |
| | | :key="item.branch_id" |
| | | :label="item.branch_name" |
| | | :value="item.branch_id"> |
| | | :value="item.branch_name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-form-item style="text-align:center;padding:0 50px"> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询</el-button> |
| | | <el-button type="primary" class="btns" size="small" @click="reset()">重置</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-upload2">导出excel</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-upload2" @click="exportData">导出excel</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row class="title-center"> |
| | | <el-col :span="10"> |
| | | <el-radio-group v-model="listQuery.form.alter_status" style="border:none"> |
| | | <el-radio-group v-model="listQuery.form.alter_status" @change="changeStatus" style="border:none"> |
| | | <el-radio-button label="正在整改">正在整改</el-radio-button> |
| | | <el-radio-button label="正在复查">正在复查</el-radio-button> |
| | | <el-radio-button label="整改完成">整改完成</el-radio-button> |
| | |
| | | </el-row> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <!-- <el-table-column type="selection" width="55" align="center"></el-table-column>--> |
| | | <el-table-column prop="number" label="编号" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="number" label="编号" align="center" width="120"> |
| | | <template slot-scope="scope"> |
| | | <div class="blue-font-color" @click="showDetails(scope.row)">{{ scope.row.number }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="check_branch" label="检查部门" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="check_man" label="检查人" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="checktype" label="检查类别" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="隐患项目" align="center"> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <label>{{ formatDate(scope.row.check_date) }}</label><br/> |
| | | <label>{{ scope.row.check_class }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="地点" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_typesub" label="类别" align="center"> </el-table-column> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getPageList} from "@/api/sgyhpczl/majorHidden"; |
| | | import {getPageList,analogy_export_do} from "@/api/sgyhpczl/majorHidden"; |
| | | import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr} from "@/api/sgyhpczl/initSelect"; |
| | | export default { |
| | | data() { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | //状态切换 |
| | | changeStatus(val){ |
| | | this.listQuery.form.alter_status = val; |
| | | this.getPageList(); |
| | | }, |
| | | //日期格式转换 |
| | | formatColumnDate(row, column) { |
| | | // 获取单元格数据 |
| | | let data = row[column.property]; |
| | | if (data == null) { |
| | | return null; |
| | | } |
| | | let dt = new Date(data); |
| | | return ( |
| | | dt.getFullYear() + "-" + (dt.getMonth() + 1) + "-" + dt.getDate() + " " |
| | | ); |
| | | }, |
| | | exportData() { |
| | | this.listLoading = true |
| | | var requestData = JSON.parse(JSON.stringify(this.listQuery)); |
| | | requestData.export_type = 0; |
| | | //删除分页参数 |
| | | this.$delete(requestData, 'page') |
| | | this.$delete(requestData, 'limit') |
| | | analogy_export_do(requestData).then(res => { |
| | | this.listLoading = false |
| | | var blob = new Blob([res.data]) |
| | | var downloadElement = document.createElement('a') |
| | | var href = window.URL.createObjectURL(blob) //创建下载的链接 |
| | | downloadElement.href = href |
| | | downloadElement.download = '重大隐患整改进度.xlsx' //下载后文件名 |
| | | document.body.appendChild(downloadElement) |
| | | downloadElement.click() //点击下载 |
| | | document.body.removeChild(downloadElement) //下载完成移除元素 |
| | | window.URL.revokeObjectURL(href) //释放掉blob对象 |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | initYHLX(){ |
| | | initYHLX().then(res=>{ |
| | | if (res.data.ok==1){ |
| | |
| | | path:"/fillProgress?id="+row.id |
| | | }) |
| | | }, |
| | | showDetails(row) { |
| | | this.$router.push({ |
| | | path: "/dangerDetails", |
| | | query: {"id": row.id} |
| | | }) |
| | | }, |
| | | //方法区 |
| | | formatDate(data) { |
| | | // 获取单元格数据 |
| | | if (data == null) { |
| | | return null |
| | | } |
| | | let dt = new Date(data) |
| | | return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <el-table-column prop="check_man" label="检查人" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="checktype" label="检查类别" align="center"></el-table-column> |
| | | <el-table-column label="隐患项目" align="center"> |
| | | <el-table-column prop="check_date" label="检查时间" :formatter="formatColumnDate" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="check_date" label="检查时间" :formatter="formatColumnDate" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <label>{{ formatDate(scope.row.check_date) }}</label><br/> |
| | | <label>{{ scope.row.check_class }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="地点" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" align="center"> |
| | | <template slot-scope="scope"> |
| | |
| | | let dt = new Date(data) |
| | | return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() + ' ' |
| | | }, |
| | | //方法区 |
| | | formatDate(data) { |
| | | // 获取单元格数据 |
| | | if (data == null) { |
| | | return null |
| | | } |
| | | let dt = new Date(data) |
| | | return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | v-model="time" |
| | | type="daterange" |
| | | range-separator="至" |
| | | value-format="yyyy-MM-dd" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="预案名称"> |
| | | <el-input v-model="listQuery.filter.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5" style="text-align: center"> |
| | | <el-button type="primary" class="btns" icon="el-icon-search" @click="find()" |
| | | >搜索</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="emergencyPlanC('', '新增')" |
| | | class="btns" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | @click="reset()" |
| | | >重置</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-table :data="list" border style="width: 100%"> |
| | | <el-table-column prop="name" align="center" label="预案名称" width="150"> |
| | | </el-table-column> |
| | | <el-table-column prop="fileType" align="center" label="文件类型"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.fileType==0">图片</span> |
| | | <span v-if="scope.row.fileType==1">文件</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="附件"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.fileType==0"> |
| | | <img :src="envUrl+scope.row.fileList[0].fileUrl" @click="showViewer=true" style="max-width: 100px;height: auto"/> |
| | | <el-image-viewer |
| | | v-if="showViewer" |
| | | :on-close="()=>showViewer=false" |
| | | :url-list="scope.row.viewerList" |
| | | /> |
| | | </div> |
| | | <div v-if="scope.row.fileType==1"> |
| | | <span @click="downLoadFile(scope.row.fileList[0].fileUrl)" style="color: #3A71A8 ; cursor: pointer;">{{ scope.row.fileList[0].fileName }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <div class="app-container"> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="预案名称"> |
| | | <el-input v-model="listQuery.filter.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5" style="text-align: center"> |
| | | <el-button type="primary" class="btns" icon="el-icon-search" @click="find()" |
| | | >搜索 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="emergencyPlanC('', '新增')" |
| | | class="btns" |
| | | >新增 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | @click="reset()" |
| | | >重置 |
| | | </el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-table :data="list" border style="width: 100%"> |
| | | <el-table-column prop="name" align="center" label="预案名称" width="150"> |
| | | </el-table-column> |
| | | <el-table-column prop="fileType" align="center" label="文件类型"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.fileType==0">图片</span> |
| | | <span v-if="scope.row.fileType==1">文件</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="附件"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.fileType==0"> |
| | | <img :src="envUrl+scope.row.fileList[0].fileUrl" @click="showViewer=true" |
| | | style="max-width: 100px;height: auto"/> |
| | | <el-image-viewer |
| | | v-if="showViewer" |
| | | :on-close="()=>showViewer=false" |
| | | :url-list="scope.row.viewerList" |
| | | /> |
| | | </div> |
| | | <div v-if="scope.row.fileType==1"> |
| | | <span @click="downLoadFile(scope.row.fileList[0].fileUrl)" |
| | | style="color: #3A71A8 ; cursor: pointer;">{{ scope.row.fileList[0].fileName }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="remark" align="center" label="备注"> </el-table-column> |
| | | <el-table-column prop="createTime" align="center" label="创建时间"> </el-table-column> |
| | | <el-table-column prop="updateTime" align="center" label="更新时间"> </el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="emergencyPlanC(scope.row, '编辑')" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | @click="deleteById(scope.row.id)" |
| | | style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="recordTotal" |
| | | style="text-align: right;margin-top: 20px;" |
| | | > |
| | | </el-pagination> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="预案名称" prop="name"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="文件类型"> |
| | | <el-radio-group v-model="form.fileType" @change="changeFileType"> |
| | | <el-radio :label=0 >图片</el-radio> |
| | | <el-radio :label=1 >文件</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.fileType==0" label="图片上传"> |
| | | <upload-img :imgList="fileList" @uploadImgSuccess="uploadImgSuccess" @removeImgSuccess="removeImgSuccess"></upload-img> |
| | | </el-form-item> |
| | | <el-form-item label="文件链接" v-if="form.fileType==1"> |
| | | <upload-file v-bind:url="fileUrl" v-bind:name="fileName" @uploadFileSuccess="uploadFileSuccess" ></upload-file> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" :rows="5" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-table-column prop="remark" align="center" label="备注"></el-table-column> |
| | | <el-table-column prop="createTime" align="center" label="创建时间"></el-table-column> |
| | | <el-table-column prop="updateTime" align="center" label="更新时间"></el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="emergencyPlanC(scope.row, '编辑')" |
| | | type="text" |
| | | size="small" |
| | | >编辑 |
| | | </el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | @click="deleteById(scope.row.id)" |
| | | style="color: red" |
| | | >删除 |
| | | </el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="recordTotal" |
| | | style="text-align: right;margin-top: 20px;" |
| | | > |
| | | </el-pagination> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="预案名称" prop="name"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="文件类型"> |
| | | <el-radio-group v-model="form.fileType" @change="changeFileType"> |
| | | <el-radio :label=0>图片</el-radio> |
| | | <el-radio :label=1>文件</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.fileType==0" label="图片上传"> |
| | | <upload-img :imgList="fileList" @uploadImgSuccess="uploadImgSuccess" |
| | | @removeImgSuccess="removeImgSuccess"></upload-img> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="文件链接" v-if="form.fileType==1" class="multiFile" v-for="(items,index) in files " |
| | | :key="index"> |
| | | <upload-file v-bind:url="items.fileUrl" v-bind:name="items.fileName" |
| | | @uploadFileSuccess="uploadFileSuccess($event,items)" |
| | | @fileNameChange="fileNameChange($event,items)"></upload-file> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="" v-if="form.fileType==1" class="multiFile"> |
| | | <el-button @click="addFile">添加文件</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" :rows="5" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" class="btns" @click="addemergencyPlan()">确 定</el-button> |
| | | <el-button @click="cancel()">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import uploadImg from "@/views/contingencyplan/uploadImg.vue"; |
| | | import uploadFile from "@/views/contingencyplan/uploadFile.vue"; |
| | | import elImageViewer from "element-ui/packages/image/src/image-viewer"; |
| | | import { |
| | | emergencyPlanList, |
| | | emergencyPlanAdd, |
| | | emergencyPlanMod, |
| | | emergencyPlanDel, |
| | | emergencyPlanList, |
| | | emergencyPlanAdd, |
| | | emergencyPlanMod, |
| | | emergencyPlanDel, |
| | | } from "@/api/emergencyplan.js"; |
| | | |
| | | export default { |
| | | components: { uploadImg , uploadFile ,elImageViewer}, |
| | | data() { |
| | | return { |
| | | uploadDisabled:false, |
| | | components: {uploadImg, uploadFile, elImageViewer}, |
| | | data() { |
| | | return { |
| | | uploadDisabled: false, |
| | | |
| | | dialogVisible: false, |
| | | dialogVisible: false, |
| | | |
| | | title: "", |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | currentPage: 1, |
| | | form: { |
| | | name: "", |
| | | fileType: 0, |
| | | fileList: [], |
| | | remark: "", |
| | | }, |
| | | listQuery: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | filter: { |
| | | name: "", |
| | | }, |
| | | }, |
| | | fileName:"", |
| | | fileUrl:"", |
| | | fileList:[], |
| | | list: [], |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "预案名称不能为空", trigger: "change" }, |
| | | ], |
| | | }, |
| | | |
| | | showViewer:false, |
| | | viewerList:[], |
| | | envUrl:process.env.IMG_API |
| | | }; |
| | | }, |
| | | created() { |
| | | this.emergencyPlan(); |
| | | }, |
| | | methods: { |
| | | |
| | | reset(){ |
| | | this.listQuery.filter={} |
| | | this.listQuery.pageIndex=1 |
| | | this.listQuery.pageSize=10 |
| | | this.emergencyPlan(); |
| | | }, |
| | | |
| | | downLoadFile(fileUrl){ |
| | | return this.$confirm(`确定下载该文件?`,'提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(() =>{ |
| | | let a = document.createElement('a') |
| | | a.href = process.env.BASE_API + '/upload/'+fileUrl |
| | | a.click(); |
| | | }) |
| | | }, |
| | | |
| | | changeFileType(){ |
| | | this.fileUrl="" |
| | | this.fileName="" |
| | | this.fileList=[] |
| | | }, |
| | | |
| | | uploadFileSuccess(res){ |
| | | this.fileName=res.fileName |
| | | this.fileUrl=res.fileUrl |
| | | }, |
| | | |
| | | uploadImgSuccess(res){ |
| | | let file = { |
| | | fileUrl : res.fileUrl, |
| | | fileName : res.fileName, |
| | | url:res.url |
| | | } |
| | | this.fileList.push(file) |
| | | }, |
| | | |
| | | removeImgSuccess(res){ |
| | | this.fileList=res.fileList |
| | | }, |
| | | |
| | | async emergencyPlan() { |
| | | var res = await emergencyPlanList(this.listQuery); |
| | | if (res.data.code === "200") { |
| | | this.list = res.data.result.records; |
| | | this.recordTotal = res.data.result.total |
| | | this.pageSize=res.data.result.size; |
| | | this.currentPage = res.data.result.current |
| | | for (let i = 0 ; i < this.list.length ; i++){ |
| | | if (this.list[i].fileList!=null && this.list[i].fileList.length>0){ |
| | | let viewerList = [] |
| | | for (let j = 0 ; j<this.list[i].fileList.length ; j++){ |
| | | viewerList.push(this.envUrl+this.list[i].fileList[j].fileUrl) |
| | | } |
| | | this.list[i].viewerList=viewerList |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | emergencyPlanC(value, type) { |
| | | this.dialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | if (type === "新增") { |
| | | this.title = "新增"; |
| | | this.form = {}; |
| | | this.fileUrl=""; |
| | | this.fileName=""; |
| | | this.fileList=[] |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form=JSON.parse(JSON.stringify(value)); |
| | | if (this.form.fileType==0){ |
| | | this.fileList=value.fileList |
| | | } else{ |
| | | this.fileUrl=value.fileList[0].fileUrl; |
| | | this.fileName=value.fileList[0].fileName |
| | | } |
| | | } |
| | | }, |
| | | addemergencyPlan() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.fileType==0){ |
| | | this.form.fileList=this.fileList |
| | | } |
| | | if (this.form.fileType==1){ |
| | | let fileList = [] |
| | | if (this.fileUrl!=""){ |
| | | let file={ |
| | | fileUrl:this.fileUrl, |
| | | fileName:this.fileName |
| | | } |
| | | fileList.push(file) |
| | | title: "", |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | currentPage: 1, |
| | | form: { |
| | | name: "", |
| | | fileType: 0, |
| | | fileList: [], |
| | | remark: "", |
| | | }, |
| | | listQuery: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | filter: { |
| | | name: "", |
| | | }, |
| | | }, |
| | | fileName: "", |
| | | fileUrl: "", |
| | | fileList: [], |
| | | list: [], |
| | | fileIndex: 1, |
| | | files: [ |
| | | { |
| | | fileName: "", |
| | | fileUrl: "" |
| | | } |
| | | this.form.fileList=fileList |
| | | } |
| | | if (this.title === "新增") { |
| | | emergencyPlanAdd(this.form).then((res) => { |
| | | if (res.data.code === "200") { |
| | | this.dialogVisible = false; |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "新增成功", |
| | | title: "成功", |
| | | }); |
| | | }else{ |
| | | this.$message.error(res.data.message); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | emergencyPlanMod(this.form).then((res) => { |
| | | if (res.data.code === "200") { |
| | | this.dialogVisible = false; |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "编辑成功", |
| | | title: "成功", |
| | | }); |
| | | }else{ |
| | | this.$message.error(res.data.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | ], |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: "预案名称不能为空", trigger: "change"}, |
| | | ], |
| | | }, |
| | | |
| | | showViewer: false, |
| | | viewerList: [], |
| | | envUrl: process.env.IMG_API |
| | | }; |
| | | }, |
| | | deleteById(val) { |
| | | this.$confirm('确认删除吗','提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(()=>{ |
| | | emergencyPlanDel({ id: val }).then(() => { |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }); |
| | | created() { |
| | | this.emergencyPlan(); |
| | | }, |
| | | methods: { |
| | | |
| | | reset() { |
| | | this.listQuery.filter = {} |
| | | this.listQuery.pageIndex = 1 |
| | | this.listQuery.pageSize = 10 |
| | | this.emergencyPlan(); |
| | | }, |
| | | |
| | | downLoadFile(fileUrl) { |
| | | return this.$confirm(`确定下载该文件?`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | let a = document.createElement('a') |
| | | a.href = process.env.BASE_API + '/upload/' + fileUrl |
| | | a.click(); |
| | | }) |
| | | .catch(error =>{ |
| | | }, |
| | | |
| | | changeFileType() { |
| | | this.fileUrl = "" |
| | | this.fileName = "" |
| | | this.fileList = [] |
| | | }, |
| | | |
| | | uploadFileSuccess(res, item) { |
| | | if (res.fileUrl == null || res.fileUrl == '') { |
| | | this.files = this.files.filter(n=>n.id != item.id); |
| | | } else { |
| | | item.fileName = res.fileName |
| | | item.fileUrl = res.fileUrl |
| | | } |
| | | }, |
| | | |
| | | fileNameChange(res, item) { |
| | | item.fileName = res; |
| | | }, |
| | | |
| | | uploadImgSuccess(res) { |
| | | let file = { |
| | | fileUrl: res.fileUrl, |
| | | fileName: res.fileName, |
| | | url: res.url |
| | | } |
| | | this.fileList.push(file) |
| | | }, |
| | | |
| | | removeImgSuccess(res) { |
| | | this.fileList = res.fileList |
| | | }, |
| | | |
| | | async emergencyPlan() { |
| | | var res = await emergencyPlanList(this.listQuery); |
| | | if (res.data.code === "200") { |
| | | this.list = res.data.result.records; |
| | | this.recordTotal = res.data.result.total |
| | | this.pageSize = res.data.result.size; |
| | | this.currentPage = res.data.result.current |
| | | for (let i = 0; i < this.list.length; i++) { |
| | | if (this.list[i].fileList != null && this.list[i].fileList.length > 0) { |
| | | let viewerList = [] |
| | | for (let j = 0; j < this.list[i].fileList.length; j++) { |
| | | viewerList.push(this.envUrl + this.list[i].fileList[j].fileUrl) |
| | | } |
| | | this.list[i].viewerList = viewerList |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | emergencyPlanC(value, type) { |
| | | this.dialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | if (type === "新增") { |
| | | this.title = "新增"; |
| | | this.form = {}; |
| | | this.fileUrl = ""; |
| | | this.fileName = ""; |
| | | this.files = [] |
| | | this.fileList = [] |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = JSON.parse(JSON.stringify(value)); |
| | | this.files = this.form.fileList; |
| | | if (this.form.fileType == 0) { |
| | | this.fileList = value.fileList |
| | | } else { |
| | | this.fileUrl = value.fileList[0].fileUrl; |
| | | this.fileName = value.fileList[0].fileName |
| | | } |
| | | } |
| | | }, |
| | | addemergencyPlan() { |
| | | console.log(this.files); |
| | | // return ; |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.fileType == 0) { |
| | | this.form.fileList = this.fileList |
| | | } |
| | | if (this.form.fileType == 1) { |
| | | // let fileList = [] |
| | | // if (this.fileUrl != "") { |
| | | // let file = { |
| | | // fileUrl: this.fileUrl, |
| | | // fileName: this.fileName |
| | | // } |
| | | // fileList.push(file) |
| | | // } |
| | | this.form.fileList = this.files.filter(n => { |
| | | return n.fileUrl != null && n.fileUrl != '' && n.fileName != null && n.fileName != ''; |
| | | }) |
| | | } |
| | | if (this.title === "新增") { |
| | | emergencyPlanAdd(this.form).then((res) => { |
| | | if (res.data.code === "200") { |
| | | this.dialogVisible = false; |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "新增成功", |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message.error(res.data.message); |
| | | } |
| | | }); |
| | | } else { |
| | | emergencyPlanMod(this.form).then((res) => { |
| | | if (res.data.code === "200") { |
| | | this.dialogVisible = false; |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "编辑成功", |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message.error(res.data.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | deleteById(val) { |
| | | this.$confirm('确认删除吗', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | emergencyPlanDel({id: val}).then(() => { |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(error => { |
| | | }); |
| | | }, |
| | | cancel() { |
| | | this.emergencyPlan(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | find() { |
| | | this.emergencyPlan(); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.listQuery.pageSize = val |
| | | this.emergencyPlan(); |
| | | }, |
| | | addFile() { |
| | | this.files.push({ |
| | | fileUrl: "", |
| | | fileName: "" |
| | | }) |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.listQuery.pageIndex = val |
| | | this.emergencyPlan(); |
| | | }, |
| | | }, |
| | | cancel(){ |
| | | this.emergencyPlan(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | find() { |
| | | this.emergencyPlan(); |
| | | }, |
| | | handleSizeChange(val){ |
| | | this.listQuery.pageSize = val |
| | | this.emergencyPlan(); |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.listQuery.pageIndex = val |
| | | this.emergencyPlan(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .btns{ |
| | | background-color: #034EA2; |
| | | border: 1px solid #034EA2; |
| | | .btns { |
| | | background-color: #034EA2; |
| | | border: 1px solid #034EA2; |
| | | } |
| | | |
| | | >>> .el-input.is-disabled .el-input__inner { |
| | | background-color: white; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div style="display: flex"> |
| | | <el-input :disabled="true" type="text" size="medium" v-model="viewName" style="width: 60%" ></el-input> |
| | | <el-input :disabled="inputDisable" type="text" size="medium" v-model="viewName" style="width: 60%" @change="fileNameChange" ></el-input> |
| | | <el-upload |
| | | v-if="!disabled" |
| | | action="" |
| | |
| | | fileName: '', |
| | | filePath: '', |
| | | downloadUrl: '', |
| | | inputDisable:true, |
| | | fileList: [], |
| | | } |
| | | }, |
| | |
| | | message:'上传成功', |
| | | duration:2000, |
| | | }) |
| | | this.inputDisable = false; |
| | | }else { |
| | | this.$message.error('上传失败,系统未知错误!错误码为【500】'); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleClear(){ |
| | | handleClear(index){ |
| | | this.fileName = ''; |
| | | this.fileList = []; |
| | | this.viewName="" |
| | |
| | | fileUrl: '', |
| | | fileName: '' |
| | | }); |
| | | this.inputDisable = true; |
| | | }, |
| | | |
| | | fileNameChange(event){ |
| | | this.$emit('fileNameChange', event); |
| | | }, |
| | | |
| | | beforeUpload(file) { |
| | |
| | | <el-table-column type="index" width="55" align="center" label="序号"></el-table-column> |
| | | <el-table-column prop="ht_branch" align="center" label="隐患部门"></el-table-column> |
| | | <el-table-column prop="address" align="center" label="地点"></el-table-column> |
| | | <el-table-column prop="ht_content" align="center" label="隐患内容"></el-table-column> |
| | | <el-table-column prop="measure" align="center" label="整改措施"></el-table-column> |
| | | <el-table-column prop="ht_content" align="center" label="隐患内容"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.ht_content }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.ht_content != null && scope.row.ht_content.length > 10 ? scope.row.ht_content.substring(0, 8) + "...." : scope.row.ht_content |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="measure" align="center" label="整改措施"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.measure }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.measure != null && scope.row.measure.length > 10 ? scope.row.measure.substring(0, 8) + "...." : scope.row.measure |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ht_typesub" align="center" label="隐患类别"></el-table-column> |
| | | <el-table-column prop="dangerousSource" align="center" label="关联危险源"></el-table-column> |
| | | <el-table-column prop="DTRisk_level" align="center" label="风险等级"></el-table-column> |
| | |
| | | v-for="item in YHBMList" |
| | | :key="item.branch_id" |
| | | :label="item.branch_name" |
| | | :value="item.branch_id"> |
| | | :value="item.branch_name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-form-item style="text-align:center;padding:0 50px"> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询</el-button> |
| | | <el-button type="primary" class="btns" size="small" @click="reset()">重置</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-upload2">导出excel</el-button> |
| | | <el-button type="primary" class="btns" size="small" icon="el-icon-upload2" @click="exportData">导出excel</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row class="title-center"> |
| | | <el-col :span="14"> |
| | | <el-form ref="form" :inline="true" :model="form" label-width="100px"> |
| | | <el-form-item label="EXCEL导入"> |
| | | <el-input v-model="form.name" placeholder="未选择文件"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" class="btns" |
| | | >选择文件</el-button |
| | | <!-- <el-input v-model="form.name" placeholder="未选择文件"></el-input>--> |
| | | <el-upload |
| | | class="upload-demo inline-block margin-right-10" |
| | | ref="upload" |
| | | action="" |
| | | :http-request="uploadSectionFile" |
| | | :on-preview="handlePreview" |
| | | :on-remove="handleRemove" |
| | | :file-list="fileList" |
| | | :before-upload="beforeUpload" |
| | | :auto-upload="false" |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | size="small" |
| | | icon="el-icon-bottom" |
| | | >导入</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | size="small" |
| | | icon="el-icon-download" |
| | | >下载模板</el-button |
| | | > |
| | | <el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | size="small" |
| | | icon="el-icon-bottom" |
| | | @click="dangerImport" |
| | | >导入</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | class="btns" |
| | | size="small" |
| | | icon="el-icon-download" |
| | | @click="downloadTemplate" |
| | | >下载模板</el-button |
| | | > |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <!-- <el-col :span="14-fileSpan">--> |
| | | <!-- --> |
| | | <!-- </el-col>--> |
| | | <el-col :span="10" style="text-align: right"> |
| | | <el-button |
| | | class="btns" |
| | |
| | | <el-table-column prop="check_man" label="检查人" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="checktype" label="检查类别" align="center"></el-table-column> |
| | | <el-table-column label="隐患项目" align="center"> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <label>{{ formatDate(scope.row.check_date) }}</label><br/> |
| | | <label>{{ scope.row.check_class }}</label> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="地点" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.ht_content }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.ht_content != null && scope.row.ht_content.length > 10 ? scope.row.ht_content.substring(0, 8) + "...." : scope.row.ht_content |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ht_typesub" label="类别" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_level" label="级别" align="center"> </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="整改计划" align="center"> |
| | | <el-table-column prop="measure" label="整改措施" align="center"> </el-table-column> |
| | | <el-table-column prop="measure" label="整改措施" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.measure }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.measure != null && scope.row.measure.length > 10 ? scope.row.measure.substring(0, 8) + "...." : scope.row.measure |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ht_branch" label="隐患部门" align="center"> </el-table-column> |
| | | <el-table-column prop="duty_officer" label="责任人" align="center"> </el-table-column> |
| | | <el-table-column prop="alter_time" label="限改时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="alter_time" label="限改时间" width="120" :formatter="formatColumnDate" align="center"></el-table-column> |
| | | <el-table-column prop="ht_level" label="级别" align="center"> </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="整改情况" align="center"> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getPageList,delDanger} from "@/api/sgyhpczl/hiddenDangerRegistration"; |
| | | import {getPageList,delDanger,analogy_export_do,downloadFile,danger_import_do} from "@/api/sgyhpczl/hiddenDangerRegistration"; |
| | | import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr} from "@/api/sgyhpczl/initSelect"; |
| | | export default { |
| | | data() { |
| | |
| | | llrList:[], |
| | | options: [], |
| | | form:{}, |
| | | |
| | | fileSpan:3, |
| | | JCDWList:[{label:"众泰煤焦化",value:0},{label:"上级单位",value:1}], |
| | | JCBMList:[], |
| | | YHLXList:[], |
| | |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | fileList: [], |
| | | }; |
| | | }, |
| | | mounted(){ |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | var fileUidList = []; |
| | | fileList.forEach(file => { |
| | | fileUidList.push(file.uid); |
| | | }) |
| | | this.fileNameList = this.fileNameList.filter(n => fileUidList.indexOf(n.uid) != -1); |
| | | }, |
| | | handlePreview(file) { |
| | | console.log(file) |
| | | }, |
| | | beforeUpload(file) { |
| | | var FileExt = file.name.replace(/.+\./, ""); |
| | | if (['xls','xlsx'].indexOf(FileExt.toLowerCase()) === -1) { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请上传后缀名为xls,xlsx的图片!' |
| | | }); |
| | | return false; |
| | | } |
| | | }, |
| | | //上传 |
| | | uploadSectionFile(param) { |
| | | console.log(param) |
| | | let form = new FormData(); |
| | | form.append('file', param.file); |
| | | danger_import_do(form).then(res=>{ |
| | | if (res.data.ok==1){ |
| | | console.log(res.data) |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | |
| | | }, |
| | | //导入 |
| | | dangerImport(){ |
| | | this.$refs.upload.submit(); |
| | | }, |
| | | //下载模板 |
| | | downloadTemplate(){ |
| | | downloadFile().then(res => { |
| | | this.listLoading = false |
| | | var blob = new Blob([res.data]) |
| | | var downloadElement = document.createElement('a') |
| | | var href = window.URL.createObjectURL(blob) //创建下载的链接 |
| | | downloadElement.href = href |
| | | downloadElement.download = '隐患整改通知单导入模板.xlsx' //下载后文件名 |
| | | document.body.appendChild(downloadElement) |
| | | downloadElement.click() //点击下载 |
| | | document.body.removeChild(downloadElement) //下载完成移除元素 |
| | | window.URL.revokeObjectURL(href) //释放掉blob对象 |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | exportData() { |
| | | this.listLoading = true |
| | | var requestData = JSON.parse(JSON.stringify(this.listQuery)); |
| | | requestData.export_type = 1; |
| | | //删除分页参数 |
| | | this.$delete(requestData, 'page') |
| | | this.$delete(requestData, 'limit') |
| | | analogy_export_do(requestData).then(res => { |
| | | this.listLoading = false |
| | | var blob = new Blob([res.data]) |
| | | var downloadElement = document.createElement('a') |
| | | var href = window.URL.createObjectURL(blob) //创建下载的链接 |
| | | downloadElement.href = href |
| | | downloadElement.download = '隐患登记下达.xlsx' //下载后文件名 |
| | | document.body.appendChild(downloadElement) |
| | | downloadElement.click() //点击下载 |
| | | document.body.removeChild(downloadElement) //下载完成移除元素 |
| | | window.URL.revokeObjectURL(href) //释放掉blob对象 |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | //方法区 |
| | | formatDate(data) { |
| | | // 获取单元格数据 |
| | | if (data == null) { |
| | | return null |
| | | } |
| | | let dt = new Date(data) |
| | | return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() |
| | | }, |
| | | //日期格式转换 |
| | | formatColumnDate(row, column) { |
| | | // 获取单元格数据 |
| | | let data = row[column.property] |
| | | if (data == null) { |
| | | return null |
| | | } |
| | | let dt = new Date(data) |
| | | return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() + ' ' |
| | | }, |
| | | initYHLX(){ |
| | | initYHLX().then(res=>{ |
| | | if (res.data.ok==1){ |
| | |
| | | }; |
| | | </script> |
| | | <style> |
| | | .inline-block { |
| | | display: inline-block; |
| | | } |
| | | .inquire { |
| | | display: flex; |
| | | justify-content: left; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { loginByUsername } from '@/api/login' |
| | | import { getAccount,loginByUsername,getUserInfo } from '@/api/login' |
| | | import { getToken, setToken, removeToken } from '@/utils/auth' |
| | | import Cookies from 'js-cookie' |
| | | import { initRouter } from '@/utils/router' |
| | |
| | | Cookies.set('token_expired_at', data.tokenexpired) |
| | | _this.$store.commit('SET_NAME', data.realname) |
| | | _this.$store.commit('SET_USER_TYPE', data.type) |
| | | //换取账号密码 |
| | | getUserInfo().then(res => { |
| | | if (res.data.code == 200) { |
| | | loginForm.department = res.data.result.department |
| | | // loginForm.department = "公司领导" |
| | | getAccount(loginForm).then(res => { |
| | | if (res.data.code == 200) { |
| | | //缓存账号密码 |
| | | Cookies.set("hiddenDangerUsername",res.data.result.username) |
| | | Cookies.set("hiddenDangerPassword",res.data.result.password) |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | this.$message({type: 'error', message: "用户信息获取失败!请重试", duration: 3000}) |
| | | } |
| | | }) |
| | | |
| | | // 加载菜单 |
| | | initRouter(_this) |
| | | _this.$router.replace('/') |
| | |
| | | <el-button v-if="scope.row.status==2" @click="handleClick(scope.row)" type="text" size="small" |
| | | >查看</el-button |
| | | > |
| | | <el-button @click="Del(scope.row.id)" v-if="scope.row.status==0?true:false" type="text" size="small" style="color: red" |
| | | <el-button @click="Del(scope.row.id)" type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | |
| | | <el-form-item label="检查人名称" prop="inspector"> |
| | | <el-select |
| | | v-model="form.inspector" |
| | | filterable |
| | | style="width: 100%" |
| | | placeholder="请选择" |
| | | > |