对比新文件 |
| | |
| | | //将拦截器整体导入 |
| | | import request from '@/util/request'//导入已经写好的拦截器 |
| | | |
| | | // 分页反应措施 |
| | | export function getMeasure(data){ |
| | | return request({ |
| | | url: '/response/measure/page', |
| | | method: 'post', |
| | | data: data, |
| | | }) |
| | | } |
| | | |
| | | // 新增反应措施 |
| | | export function addMeasure(data){ |
| | | return request({ |
| | | url: '/response/measure/add', |
| | | method: 'post', |
| | | data: data, |
| | | }) |
| | | } |
| | | |
| | | // 修改反应措施 |
| | | export function updateMeasure(data){ |
| | | return request({ |
| | | url: '/response/measure/update', |
| | | method: 'post', |
| | | data: data, |
| | | }) |
| | | } |
| | | |
| | | // 删除反应措施 |
| | | export function delMeasure(id){ |
| | | return request({ |
| | | url: '/response/measure/deleteById?id=' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 根据id获取反应措施 |
| | | export function responseMeasure(data){ |
| | | return request({ |
| | | url: '/app/warninfo/responseMeasure/get', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | meta: { title: '短信平台设置' }, |
| | | component: () => import('@/views/Admin/smsSetting'), |
| | | }, |
| | | { |
| | | path: '/reactionManage', |
| | | name: 'reactionManage', |
| | | meta: { title: '响应措施管理' }, |
| | | component: () => import('@/views/Admin/reactionManage'), |
| | | }, |
| | | // { |
| | | // path: '/menu', |
| | | // name: 'menu', |
| | |
| | | <Projecting /> |
| | | <Dynamic style="margin-top: 20px"/> |
| | | </div> |
| | | <div class="left" v-if="userInfo.role.id == 2"> |
| | | <div class="left" v-if="userInfo.role.id == 2 || userInfo.role.id == 4"> |
| | | <Review /> |
| | | </div> |
| | | <div class="right"> |
| | |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", item.attachmentName); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.open(link.href) |
| | | // link.setAttribute("download", item.attachmentName); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | |
| | | cancelText="取消" |
| | | @cancel="handleCancel" |
| | | > |
| | | <a-table :columns="columns" :data-source="data" bordered :pagination="pagination"> |
| | | <a-table :columns="columns" :data-source="data" bordered :pagination="pagination" :rowKey="record=>record.id"> |
| | | <template #index="text,record,index"> |
| | | {{ index + 1 }} |
| | | </template> |
| | | <template #receiveUnit="name,record"> |
| | | <span v-if="unitType == 3">{{ name }}</span> |
| | | <span v-else style="cursor: pointer;color: #1890ff" @click="digData(record.forwardWarnInfoId,record.unittype)">{{ name }}</span> |
| | | </template> |
| | | <template #warningLevel="text"> |
| | | <a-tag :color="text === 3 ? 'yellow' :text === 2? 'orange':text === 1?'red':'blue'"> |
| | |
| | | {{text == 1 ? '待叫应' : text == 2 ?'已叫应':text == 3 ?'超时未叫应' : ''}} |
| | | </a-tag> |
| | | </template> |
| | | <template #forwardRate="text,record"> |
| | | {{record.forwardStatus == 1?text: '--' }} |
| | | </template> |
| | | <template #operation="text, record, index"> |
| | | <a-button type="primary" @click="viewDetail(record.id)">查看详情</a-button> |
| | | </template> |
| | | </a-table> |
| | | <call-list-mod ref="callList"></call-list-mod> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getResponseById} from "@/api/list"; |
| | | import callListMod from "@/views/Admin/components/callListMod"; |
| | | import msgDetailMod from "@/views/Admin/components/msgDetailMod"; |
| | | import {responseMeasure} from "@/api/new"; |
| | | export default { |
| | | name: 'callListMod', |
| | | name: 'call-list-mod', |
| | | components: { callListMod }, |
| | | data () { |
| | | return { |
| | | visible: false, |
| | | unitType: null, |
| | | search:{ |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | |
| | | { |
| | | title: '序号', |
| | | dataIndex: 'index', |
| | | width: '8%', |
| | | scopedSlots: { |
| | | customRender: 'index' |
| | | } |
| | |
| | | { |
| | | title: '接收人单位', |
| | | dataIndex: 'receiveUnit', |
| | | width: '20%' |
| | | scopedSlots: { customRender: 'receiveUnit' } |
| | | }, |
| | | { |
| | | title: '接收人', |
| | | dataIndex: 'recipienterName', |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: '级别', |
| | | dataIndex: 'unittype', |
| | | width: '12%', |
| | | scopedSlots: { |
| | | customRender: 'unittype' |
| | | }, |
| | |
| | | { |
| | | title: '叫应状态', |
| | | dataIndex: 'responseStatus', |
| | | width: '15%', |
| | | scopedSlots: { |
| | | customRender: 'responseStatus' |
| | | } //设置定制化表格数据 |
| | | } |
| | | }, |
| | | { |
| | | title: '转发叫应率', |
| | | dataIndex: 'forwardRate', |
| | | scopedSlots: { |
| | | customRender: 'forwardRate' |
| | | } |
| | | }, |
| | | { |
| | | title: '响应措施', |
| | | dataIndex: 'operation', |
| | | scopedSlots: { |
| | | customRender: 'operation' |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | |
| | | const t = this |
| | | }, |
| | | methods:{ |
| | | openMod(id){ |
| | | openMod(id,type){ |
| | | const t = this |
| | | t.visible = true |
| | | t.unitType = type |
| | | t.search.searchParams.warnInfoId = id |
| | | t.getData() |
| | | if(type == 3){ |
| | | t.columns = t.columns.filter(i=>i.dataIndex !== 'forwardRate') |
| | | }else{ |
| | | t.columns = t.columns.filter(i=>i.dataIndex !== 'operation') |
| | | } |
| | | }, |
| | | async getData(){ |
| | | const t = this |
| | |
| | | } |
| | | }, |
| | | |
| | | async viewDetail(id){ |
| | | const t = this |
| | | const res = await responseMeasure({id:id}) |
| | | if(res.data.code == 100){ |
| | | const data = res.data.data |
| | | if(!data.baseMeasureIds){ |
| | | t.$message.error('该记录暂无响应措施') |
| | | }else{ |
| | | console.log('666') |
| | | } |
| | | }else{ |
| | | this.$message.error(res.data.msg) |
| | | } |
| | | }, |
| | | |
| | | digData(id,type){ |
| | | this.$refs.callList.openMod(id,type) |
| | | }, |
| | | |
| | | onPageChange(page, pageSize) { |
| | | const t= this |
| | | t.pagination.current = page |
| | |
| | | </a-row> |
| | | <a-row :gutter="24" v-if="details.publishingUnit"><a-col :span="4">发布单位</a-col><a-col :span="14">{{details.publishingUnit}}</a-col></a-row> |
| | | <a-row :gutter="24" v-if="details.content"><a-col :span="4">信息内容</a-col><a-col :span="14">{{details.content}}</a-col></a-row> |
| | | <a-row :gutter="24" v-if="details.directViewUrl"><a-col :span="4">直览附件</a-col><a-col :span="14" style="border: none"><a :href="details.directViewUrl" target="_blank" class="urlClick">{{details.directViewUrl}}</a></a-col></a-row> |
| | | <a-row :gutter="24" v-if="details.recipients && details.recipients.length>0"> |
| | | <a-col :span="4">接收人</a-col> |
| | | <a-col :span="20"> |
| | | <b>本次共发送信息给 {{details.recipients.length}}人:</b><br/><br/> |
| | | {{details.recipients.map(i=>i.realName + '(' + i.phone + ')').join(',')}} |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24" v-if="details.acceptingUnitIds && details.acceptingUnitIds.length>0"> |
| | | <a-col :span="4">接收人</a-col> |
| | | <a-col :span="20"> |
| | | <b>本次共发送信息给 {{details.acceptingUnitIds.length}}人:</b><br/><br/> |
| | | {{details.acceptingUnitIds.map(i=>i.recipienterName + '(' + i.recipienterPhone + ')').join(',')}} |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24" v-if="details.attachments && details.attachments.length > 0"><a-col :span="4">附件内容</a-col> |
| | |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", item.attachementName); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.open(link.href) |
| | | // link.setAttribute("download", item.attachementName); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | .urlClick:hover{ |
| | | text-decoration: underline; |
| | | } |
| | | </style> |
| | |
| | | <a-form-model-item prop="content"> |
| | | <a-textarea v-model="form.content" placeholder="请输入短信通知内容部分" :auto-size="{ minRows: 3, maxRows: 5 }" :readOnly="disable"/> |
| | | </a-form-model-item> |
| | | <a-row v-if="userInfo.unittype == 1 || title == '信息转发' || title == '信息审核'||title == '信息详情'"> |
| | | <a-col :span="24" style="display: flex;align-items: center"> |
| | | <b style="margin-bottom: 24px">直览附件URL:</b> |
| | | <a-form-model-item style="width: 50%"> |
| | | <a-textarea :readonly="title == '信息转发'||title == '信息审核'||title == '信息详情'?true:false" v-model="form.directViewUrl" placeholder="请输入url信息" :auto-size="{ minRows: 1, maxRows: 3 }"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-upload |
| | |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <a-checkbox :checked="withLeaders" @change="isAddLeaders" style="margin-bottom: 24px" :disabled="disable"> |
| | | 同时发信息给本级领导 |
| | | </a-checkbox> |
| | | <!-- <a-checkbox :checked="withLeaders" @change="isAddLeaders" style="margin-bottom: 24px" :disabled="disable">--> |
| | | <!-- 同时发信息给本级领导--> |
| | | <!-- </a-checkbox>--> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <div style="display:flex;justify-content: space-between;align-items: center;"> |
| | |
| | | disasterType: undefined, |
| | | warningLevel: undefined, |
| | | content: '', |
| | | directViewUrl: '', |
| | | publishingUnit: '', |
| | | districtId: null, |
| | | attachments: [], |
| | |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | openMod(type,data){ |
| | | openMod(type,data,id){ |
| | | const t = this |
| | | t.getLeaders() |
| | | t.form.acceptingUnitIds = [] |
| | |
| | | t.form.warningLevel = data.warningLevel |
| | | t.form.content = data.content |
| | | t.form.timeout = data.timeout |
| | | t.form.forwardWarnInfoLogId = id |
| | | t.form.forwardStatus = 1 |
| | | t.form.forwardPath = data.forwardPath |
| | | t.form.directViewUrl = data.directViewUrl |
| | | if(data.attachments && data.attachments.length>0){ |
| | | t.fileList = data.attachments.map((i)=>{ |
| | | return { |
| | |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", file.name); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.open(link.href) |
| | | // link.setAttribute("download", file.name); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
对比新文件 |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :visible="visible" |
| | | centered |
| | | :confirm-loading="confirmLoading" |
| | | width="50%" |
| | | cancelText="取消" |
| | | okText="确认" |
| | | @ok="onSubmit" |
| | | @cancel="handleCancel" |
| | | :afterClose="clearMod" |
| | | > |
| | | <a-form-model ref="ruleForm" :rules="rules" :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" :colon="false"> |
| | | <a-form-model-item label="所属灾种" prop="disasterType"> |
| | | <a-select v-model="form.disasterType" placeholder="选择灾种"> |
| | | <a-select-option v-for="item in riskOptions" :value="item.value" :key="item.value">{{item.name}}</a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="响应措施" prop="measure"> |
| | | <a-textarea v-model="form.measure" :auto-size="{ minRows: 3, maxRows: 6 }"/> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import {addMeasure,updateMeasure} from "@/api/new"; |
| | | export default { |
| | | name: 'reactionMod', |
| | | props: [], |
| | | data () { |
| | | return { |
| | | title: '新增响应措施', |
| | | visible: false, |
| | | confirmLoading: false, |
| | | labelCol: { span: 4 }, |
| | | wrapperCol: { span: 14 }, |
| | | form: { |
| | | id: null, |
| | | disasterType: null, |
| | | measure: '' |
| | | }, |
| | | rules: { |
| | | disasterType: [{ required: true, message: '请选择所属灾种', trigger: 'blur'}], |
| | | measure: [{ required: true, message: '请输入响应措施', trigger: 'blur'}] |
| | | }, |
| | | riskOptions: [ |
| | | { |
| | | name: '地震', |
| | | value: 1 |
| | | }, |
| | | { |
| | | name: '洪涝', |
| | | value: 2 |
| | | }, |
| | | { |
| | | name: '气象', |
| | | value: 3 |
| | | }, |
| | | { |
| | | name: '泥石流', |
| | | value: 4 |
| | | }, |
| | | { |
| | | name: '水旱', |
| | | value: 5 |
| | | }, |
| | | { |
| | | name: '森林草原火灾', |
| | | value: 6 |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | created() { |
| | | const t = this |
| | | }, |
| | | methods:{ |
| | | openDialog(type,data){ |
| | | const t = this |
| | | if(type == 'add'){ |
| | | t.title = '新增响应措施' |
| | | t.form = { |
| | | id: null, |
| | | disasterType: null, |
| | | measure: '' |
| | | } |
| | | }else{ |
| | | t.title = '编辑响应措施' |
| | | for(let i in data){ |
| | | if(t.isValidKey(i,t.form)){ |
| | | t.form[i] = data[i] |
| | | } |
| | | } |
| | | } |
| | | t.visible = true |
| | | }, |
| | | isValidKey(key, object){ |
| | | return key in object; |
| | | }, |
| | | |
| | | clearMod(){ |
| | | this.$refs.ruleForm.clearValidate() |
| | | this.$refs.ruleForm.resetFields() |
| | | }, |
| | | |
| | | onSubmit() { |
| | | this.$refs.ruleForm.validate(valid => { |
| | | if (valid) { |
| | | if(this.title == '新增响应措施'){ |
| | | const { id,...data } = this.form |
| | | addMeasure(data).then((res)=>{ |
| | | if(res.data.code == 100){ |
| | | this.$message.success('新增响应措施成功') |
| | | this.$emit('refresh') |
| | | this.visible = false |
| | | }else{ |
| | | this.$message.error(res.data.msg) |
| | | } |
| | | }) |
| | | }else{ |
| | | updateMeasure(this.form).then((res)=>{ |
| | | if(res.data.code == 100){ |
| | | this.$message.success('修改响应措施成功') |
| | | this.$emit('refresh') |
| | | this.visible = false |
| | | }else{ |
| | | this.$message.error(res.data.msg) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | handleCancel(e) { |
| | | const t = this |
| | | t.visible = false; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
| | |
| | | <a-form-model-item label="角色" prop="roleId"> |
| | | <a-select v-model="form.roleId" placeholder="角色"> |
| | | <a-select-option :value="2"> |
| | | 审批领导 |
| | | </a-select-option> |
| | | <a-select-option :value="4"> |
| | | 领导 |
| | | </a-select-option> |
| | | <a-select-option :value="3"> |
| | |
| | | let blob = new Blob([res.data],{type: res.data.type})
|
| | | link.style.display = "none";
|
| | | link.href = URL.createObjectURL(blob); // 创建URL
|
| | | link.setAttribute("download", item.attachmentName);
|
| | | document.body.appendChild(link);
|
| | | link.click();
|
| | | document.body.removeChild(link);
|
| | | window.open(link.href)
|
| | | // link.setAttribute("download", item.attachmentName);
|
| | | // document.body.appendChild(link);
|
| | | // link.click();
|
| | | // document.body.removeChild(link);
|
| | | } else {
|
| | | this.$message.error('获取文件失败')
|
| | | }
|
| | |
| | | let blob = new Blob([res.data],{type: res.data.type})
|
| | | link.style.display = "none";
|
| | | link.href = URL.createObjectURL(blob); // 创建URL
|
| | | link.setAttribute("download", item.attachmentName);
|
| | | document.body.appendChild(link);
|
| | | link.click();
|
| | | document.body.removeChild(link);
|
| | | window.open(link.href)
|
| | | // link.setAttribute("download", item.attachmentName);
|
| | | // document.body.appendChild(link);
|
| | | // link.click();
|
| | | // document.body.removeChild(link);
|
| | | } else {
|
| | | this.$message.error('获取文件失败')
|
| | | }
|
| | |
| | | responseMsg(id).then(res=>{
|
| | | if(res.data.code == 100){
|
| | | t.$message.success('信息叫应成功');
|
| | | t.search = {
|
| | | pageIndex: 1,
|
| | | pageSize: 10,
|
| | | searchParams:{
|
| | | responseStatus: null,
|
| | | startTime: '',
|
| | | endTime: ''
|
| | | }
|
| | | },
|
| | | t.getData()
|
| | | }else{
|
| | | t.$message.warning(res.data.msg);
|
| | |
| | | getReviewDetailByWorker(data.warnInfoId).then(res=>{
|
| | | if(res.data.code == 100){
|
| | | if(res.data.data){
|
| | | t.$refs.msgEdit.openMod(type,res.data.data)
|
| | | t.$refs.msgEdit.openMod(type,res.data.data,data.id)
|
| | | }else{
|
| | | t.$message.error('查询信息详情失败')
|
| | | }
|
| | |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", item.attachmentName); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.open(link.href) |
| | | // link.setAttribute("download", item.attachmentName); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | |
| | | <a-textarea v-model="form.content" placeholder="请输入短信通知内容部分"
|
| | | :auto-size="{ minRows: 3, maxRows: 5 }" />
|
| | | </a-form-model-item>
|
| | | <a-row v-if="userInfo.unittype == 1">
|
| | | <a-col :span="24" style="display: flex;align-items: center">
|
| | | <b style="margin-bottom: 24px">直览附件URL:</b>
|
| | | <a-form-model-item prop="directViewUrl" style="width: 50%">
|
| | | <a-textarea v-model="form.directViewUrl" placeholder="请输入url信息" :auto-size="{ minRows: 1, maxRows: 3 }"/>
|
| | | </a-form-model-item>
|
| | | </a-col>
|
| | | </a-row>
|
| | | <a-row>
|
| | | <a-col :span="12">
|
| | | <a-upload :action="uploadUrl" :file-list="fileList" @change="fileChange" :headers="header"
|
| | |
| | | disasterType: undefined,
|
| | | warningLevel: undefined,
|
| | | content: '',
|
| | | directViewUrl: '',
|
| | | publishingUnit: '',
|
| | | districtId: null,
|
| | | attachments: [],
|
对比新文件 |
| | |
| | | <template> |
| | | <div class="inner"> |
| | | <a-row type="flex" justify="space-between" style="margin-bottom: 20px"> |
| | | <a-col :span="4"> |
| | | <a-button type="primary" @click="editData('add',{})">新增</a-button> |
| | | </a-col> |
| | | <a-col :span="20"> |
| | | <a-row type="flex" justify="end" :gutter="12"> |
| | | <!-- <a-col :span="4">--> |
| | | <!-- <a-input v-model="search.searchParams.realName" placeholder="姓名" style="width: 100%"/>--> |
| | | <!-- </a-col>--> |
| | | <!-- <a-col :span="4">--> |
| | | <!-- <a-button type="primary" @click="getUserList">查询</a-button>--> |
| | | <!-- <a-button style="margin-left: 12px" @click="resetSearch">重置</a-button>--> |
| | | <!-- </a-col>--> |
| | | </a-row> |
| | | </a-col> |
| | | </a-row> |
| | | <div class="table-cont"> |
| | | <a-table :columns="columns" :data-source="tableData" :pagination="pagination" :rowKey="record=>record.id" bordered> |
| | | <template #disasterType="type"> |
| | | {{ getRiskName(type) }} |
| | | </template> |
| | | <template #action="action,row"> |
| | | <a-button type="link" @click="editData('edit',row)">编辑</a-button> |
| | | <a-button type="link" class="delBtn" @click="delData(row)">删除</a-button> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | <reaction-mod ref="reactRef" @refresh="getMeasureList()"></reaction-mod> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getMeasure,addMeasure,delMeasure} from '@/api/new' |
| | | import {getUserInfo} from "@/util/storage" |
| | | import ReactionMod from "@/views/Admin/components/reactionMod"; |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | name: 'reactionManage', |
| | | components: { ReactionMod }, |
| | | data () { |
| | | return { |
| | | unittype: null, |
| | | search:{ |
| | | pageIndex: 1, |
| | | pageSize: 10 |
| | | }, |
| | | columns:[ |
| | | { |
| | | title: '所属灾种', |
| | | dataIndex: 'disasterType', |
| | | key: 'disasterType', |
| | | scopedSlots: { customRender: 'disasterType' } |
| | | }, |
| | | { |
| | | title: '措施内容', |
| | | dataIndex: 'measure', |
| | | key: 'measure' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | key: 'action', |
| | | scopedSlots: { customRender: 'action' } |
| | | }, |
| | | ], |
| | | riskOptions: [ |
| | | { |
| | | name: '地震', |
| | | value: 1 |
| | | }, |
| | | { |
| | | name: '洪涝', |
| | | value: 2 |
| | | }, |
| | | { |
| | | name: '气象', |
| | | value: 3 |
| | | }, |
| | | { |
| | | name: '泥石流', |
| | | value: 4 |
| | | }, |
| | | { |
| | | name: '水旱', |
| | | value: 5 |
| | | }, |
| | | { |
| | | name: '森林草原火灾', |
| | | value: 6 |
| | | } |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | defaultCurrent: 1, |
| | | defaultPageSize: 10, |
| | | total: 0, |
| | | onChange: ( page, pageSize ) => this.onPageChange(page,pageSize), |
| | | showTotal: total => `共 ${total} 条` |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | const t = this |
| | | t.unittype = getUserInfo().unittype |
| | | t.getMeasureList() |
| | | }, |
| | | methods:{ |
| | | async getMeasureList(){ |
| | | const t = this |
| | | const res = await getMeasure(t.search) |
| | | if(res.data.code == 100){ |
| | | t.tableData = res.data.data |
| | | t.pagination.total = res.data.total |
| | | }else{ |
| | | t.$message.warning(res.data.msg); |
| | | } |
| | | }, |
| | | |
| | | getRiskName(type){ |
| | | return this.riskOptions.find(i=>i.value == type)?.name |
| | | }, |
| | | |
| | | async delData(row){ |
| | | const t = this |
| | | this.$confirm({ |
| | | title: '提示', |
| | | content: h => <div>是否删除该条响应措施?</div>, |
| | | cancelText: '取消', |
| | | okText: '确认', |
| | | centered: true, |
| | | onOk() { |
| | | delMeasure(row.id).then(res=>{ |
| | | if(res.data.code == 100){ |
| | | t.$message.success('删除响应措施成功'); |
| | | t.getMeasureList() |
| | | }else{ |
| | | t.$message.warning(res.data.msg); |
| | | } |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | console.log('Cancel'); |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | | resetSearch(){ |
| | | const t = this |
| | | t.search = { |
| | | pageIndex: 1, |
| | | pageSize: 10 |
| | | } |
| | | t.getMeasureList() |
| | | }, |
| | | |
| | | editData(type,data){ |
| | | const t = this |
| | | t.$refs.reactRef.openDialog(type,data) |
| | | }, |
| | | |
| | | onPageChange(page, pageSize) { |
| | | const t= this |
| | | t.pagination.current = page |
| | | t.search.pageIndex = page |
| | | t.getMeasureList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .delBtn{ |
| | | color: @danger |
| | | } |
| | | </style> |
| | |
| | | <msg-detail-mod ref="msgDetail"></msg-detail-mod> |
| | | <call-list-mod ref="callList" @refresh="getData"></call-list-mod> |
| | | </div> |
| | | <!-- 对话框 --> |
| | | <a-modal title="查看叫应详情" |
| | | okText="确认" |
| | | cancelText="关闭" |
| | | :visible="visible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleOk"> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | scopedSlots: { |
| | | customRender: 'operation' |
| | | }, |
| | | }, |
| | | } |
| | | ]; |
| | | export default { |
| | | name: 'release', |
| | |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", item.attachmentName); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.open(link.href) |
| | | // link.setAttribute("download", item.attachmentName); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | |
| | | t.timeRange = [] |
| | | t.getData() |
| | | }, |
| | | |
| | | //弹出层 |
| | | showModal() { |
| | | this.visible = true; |
| | | }, |
| | | |
| | | handleOk(e) { |
| | | this.visible = false; |
| | |
| | | <div>
|
| | | <a-layout id="components-layout-demo-custom-trigger" :style="{ height: '100vh' }">
|
| | | <a-layout-sider v-model="collapsed" :trigger="null" collapsible>
|
| | | <div class="logo">{{ collapsed ? collapsed : '预警响应系统' }}</div>
|
| | | <div class="logo" v-if="!collapsed">{{ '预警响应系统' }}</div>
|
| | | <div class="logo" v-else><a-icon type="alert" /></div>
|
| | | <menuSider />
|
| | | </a-layout-sider>
|
| | | <a-layout>
|