| | |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function measureList(data) { |
| | | return service({ |
| | | url: '/response/measure/page', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function submitMeasures(data) { |
| | | return service({ |
| | | url: '/app/warninfo/responseMeasure/submit', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function getPublished(data) { |
| | | return service({ |
| | | url: '/app/warninfo/published/Page', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function getMeasureDetail(data) { |
| | | return service({ |
| | | url: '/app/warninfo/responseMeasure/get', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function getResponseDetail(data) { |
| | | return service({ |
| | | url: '/app/warninfo/responses/page', |
| | | method: 'POST', |
| | | data |
| | | }) |
| | | } |
| | |
| | | uni.setStorageSync("tk", res.data.tk); |
| | | uni.setStorageSync("uid",res.data.uid); |
| | | uni.setStorageSync('user', res.data); |
| | | uni.setStorageSync('unittype',res.data.unittype); |
| | | uni.setStorageSync('roleName', res.data.role.roleName); |
| | | if(res.data.role.roleName == '工作人员'){ |
| | | this.$store.commit('setRoleId', 'user_other'); |
| | |
| | | |
| | | <script> |
| | | import tabBar from '../tabBarIndex.vue' |
| | | import {getExamine} from '../../../api/examine.js' |
| | | import { getPublished } from '../../../api/notice.js' |
| | | import tebBar from '../tabBarIndex.vue' |
| | | export default { |
| | | components:{ |
| | |
| | | return { |
| | | data: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | pageSize: 10000000, |
| | | searchParams: { |
| | | emergType: null,//1-紧急;2-常规 |
| | | warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警 |
| | | reviewStatus: null//1:未审核,2:已审核,3:审核已驳回 |
| | | } |
| | | }, |
| | | page: 'pages/tabBar/current/current', |
| | |
| | | ], |
| | | selectedSaleAnalysis: 'all', |
| | | InfoList: [], |
| | | unitType: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.unitType = uni.getStorageSync('unittype'); |
| | | console.log("11",this.unitType) |
| | | //获取手机状态栏高度 |
| | | this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; |
| | | uni.hideTabBar(); |
| | |
| | | getInfoList() { |
| | | this.data.searchParams.emergType = this.checked ? 1 : null; |
| | | this.data.searchParams.warningLevel = this.selectedSaleAnalysis == 'all' ? null : this.selectedSaleAnalysis =='red' ? 1 : this.selectedSaleAnalysis =='orange' ? 2: this.selectedSaleAnalysis =='yellow'? 3 : 4; |
| | | // getExamine(this.data).then(res => { |
| | | // if(res.code == 100) { |
| | | this.InfoList = [ |
| | | { |
| | | attachment: null, |
| | | disasterType: 1, |
| | | gmtReviewSubmit: "2023-07-21 14:36:16", |
| | | id: 111, |
| | | infoSubmitter: "1-1", |
| | | infoSubmitterReal: "省级工作人员", |
| | | publishingUnit: "自治区自然灾害综合检测预警中心", |
| | | reviewStatus: 1, |
| | | title: "【20230721】预警信息标题", |
| | | warningLevel: 1, |
| | | } |
| | | ]; |
| | | if(this.InfoList.length > 0) { |
| | | getPublished(this.data).then(res => { |
| | | if(res.code == 100) { |
| | | this.InfoList = res.data |
| | | if(this.InfoList && this.InfoList.length > 0) { |
| | | this.InfoList.forEach((item, index) => { |
| | | this.InfoList[index].colorContent = item.warningLevel == 1 ? '红色预警': item.warningLevel == 2 ? '橙色预警': item.warningLevel == 3 ? '黄色预警':'蓝色预警'; |
| | | this.InfoList[index].warningLevel = item.warningLevel; |
| | | }); |
| | | } |
| | | // } |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | | handleButtonClick(button) { |
| | | this.selectedSaleAnalysis = button.label; |
| | |
| | | }) |
| | | }, |
| | | toResponsivity(item) { |
| | | //县 |
| | | uni.navigateTo({ |
| | | url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(item)) |
| | | }) |
| | | //市 |
| | | //村 |
| | | console.log("item",item) |
| | | |
| | | // if(this.unitType == 2 || this.unitType == 1 ){ |
| | | // uni.navigateTo({ |
| | | // url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(item)) |
| | | // }) |
| | | // }else if(this.unitType == 3){ |
| | | // uni.navigateTo({ |
| | | // url: `/pages/tabBar/responsivity/cityResponsivity?data=` + encodeURIComponent(JSON.stringify(item)) |
| | | // }) |
| | | // }else if(this.unitType == 4){ |
| | | // uni.navigateTo({ |
| | | // url: `/pages/tabBar/responsivity/villageResponsivity?data=` + encodeURIComponent(JSON.stringify(item)) |
| | | // }) |
| | | // } |
| | | |
| | | }, |
| | | //下拉刷新 |
| | | onPullDownRefresh() { |
| | |
| | | return { |
| | | data: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | pageSize: 999999999, |
| | | searchParams: { |
| | | emergType: null,//1-紧急;2-常规 |
| | | warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警 |
| | |
| | | border-color="white"> |
| | | </u-tag> |
| | | </view> |
| | | <text class="textTop"><b>发布单位:</b>{{detailData.publishingUnit}}</text> |
| | | <text class="textTop" v-if="detailData.forwardPath" style="display: flex;"><b>发布单位:</b> |
| | | <text v-for="(item,index) in detailData.forwardPath"> |
| | | <text v-if="index !=detailData.forwardPath.length-1"> |
| | | {{item}}> |
| | | </text> |
| | | <text v-else>{{item}}</text> |
| | | </text> |
| | | </text> |
| | | <text class="textTop" v-else><b>发布单位:</b>{{detailData.publishingUnit}}</text> |
| | | <text class="textTop"><b>短信内容:</b><i style="background-color: rgb(240, 248, 255);">{{detailData.content}}发布单位:{{detailData.publishingUnit}}</i></text> |
| | | <view style="display: flex;"> |
| | | <text class="textTop" style="width: 76px;" ><b>附件内容:</b></text> |
| | | <!-- <view class="attache" v-if="isAllImg == 'no'"> |
| | | <view class="attache" v-if="isAllImg == 'no'"> |
| | | <view v-for="(item, index) in detailData.attachments" :key="index" > |
| | | <view style="display: flex;margin-top: 10px;" v-if="item.suffix == 'jpg'|| item.suffix =='jpeg' || item.suffix =='png'"> |
| | | <image @click="previewSqs(item,index)" :src="item.attachment" style="width: 100rpx; height: 100rpx;margin-left: 5rpx;border: 3px solid #ccc;margin-right: 3px;"></image> |
| | |
| | | <u-icon name="attach" color="#2979ff" size="20"></u-icon> {{item.attachementName}} |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <!-- <view style="width: 100%; height: 100px;"> |
| | | <iframe :src="" width="100%" height="100%"> </iframe> |
| | |
| | | </view> |
| | | <!-- //村级显示 --> |
| | | </view> |
| | | <view class="measures"> |
| | | <u-button class="resBtn" type="primary" @click="goMeasures">响应措施反馈</u-button> |
| | | <view class="measures" v-if="unitType == 4"> |
| | | <u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">响应措施反馈</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | import VUE_APP_BASE_URL from '../../../common/constant.js' |
| | | import { submit } from '../../../api/examine.js' |
| | | import { publishInfo } from '../../../api/information.js' |
| | | import { getMeasureDetail } from '../../../api/notice.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | submitData: { |
| | | id: null, |
| | | reviewStatus: null |
| | | } |
| | | }, |
| | | role: '', |
| | | unitType: '' |
| | | } |
| | | }, |
| | | onLoad:function(options){ |
| | | this.role = uni.getStorageSync('roleName'); |
| | | //获取手机状态栏高度 |
| | | this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; |
| | | let test = options.data && JSON.parse(decodeURIComponent(options.data)); |
| | | this.detailData = test; |
| | | // if(this.detailData.forwardPath){ |
| | | // this.detailData.publishingUnit = this.detailData.forwardPath.map((item,index) => { |
| | | // if(index == this.detailData.forwardPath.length){ |
| | | // return item |
| | | // }else { |
| | | // return item + '>' |
| | | // } |
| | | |
| | | // }) |
| | | // } |
| | | this.unitType = uni.getStorageSync('unittype'); |
| | | console.log("this.unitType",this.unitType); |
| | | if(this.detailData.role == 'leader' || this.detailData.role == 'infoPeople' ) { |
| | | this.detailData.attachments = this.detailData.attachment; |
| | | if (this.detailData.attachments){ |
| | |
| | | }); |
| | | }, |
| | | goMeasures() { |
| | | getMeasureDetail({id: this.detailData.id}).then(res => { |
| | | if(res.code == 100){ |
| | | if(res.data.id){ |
| | | console.log('111111') |
| | | uni.navigateTo({ |
| | | url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent("2") |
| | | url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(res.data)) |
| | | }) |
| | | }else { |
| | | uni.navigateTo({ |
| | | url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData)) |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | }, |
| | | //审核通过 |
| | | approved() { |
| | |
| | | :customStyle="{marginBottom: '8px'}" |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | :label="item.name" |
| | | :name="item.name" |
| | | :label="item.measure" |
| | | :name="item.id" |
| | | > |
| | | </u-checkbox> |
| | | </u-checkbox-group> |
| | |
| | | :maxCount="10" |
| | | style="margin-top: -10px;" |
| | | ></u-upload> |
| | | <view class="pic" v-for="item in nameList" :key="index"> |
| | | <view class="pic" v-for="(item,index) in nameList" :key="index"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="measures"> |
| | | <u-button class="measureBtn" type="success">提交</u-button> |
| | | <u-button class="measureBtn" type="primary" @click="submit">提交</u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { measureList, submitMeasures, getMeasureDetail } from '@/api/notice.js' |
| | | export default { |
| | | components:{ |
| | | |
| | |
| | | statusBarHeight: [], |
| | | fileList1: [], |
| | | nameList: [], |
| | | checkboxValue1: '', |
| | | checkboxValue1: [], |
| | | measures: "", |
| | | type: 'textarea', |
| | | border: true, |
| | | height: 100, |
| | | autoHeight: true, |
| | | list: [ |
| | | { |
| | | name: '苹果', |
| | | disabled: false |
| | | }, |
| | | { |
| | | name: '香蕉', |
| | | disabled: false |
| | | }, |
| | | { |
| | | name: '橙子', |
| | | disabled: false |
| | | } |
| | | ] |
| | | detailData : {}, |
| | | measureIds : [], |
| | | baseUrl: '', |
| | | list: [], |
| | | showBtn: false |
| | | } |
| | | }, |
| | | onLoad() { |
| | | onLoad(options) { |
| | | let test = options.data && JSON.parse(decodeURIComponent(options.data)); |
| | | console.log("test",test) |
| | | this.detailData = test; |
| | | //获取手机状态栏高度 |
| | | this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; |
| | | uni.hideTabBar(); |
| | | this.getMeasureList(); |
| | | console.log("huan",process.env.NODE_ENV) |
| | | if (process.env.NODE_ENV == 'development') { |
| | | this.baseUrl = 'http://192.168.0.41:8086' |
| | | }else { |
| | | this.baseUrl = 'http://121.239.169.30:13001' |
| | | } |
| | | }, |
| | | methods: { |
| | | getMeasureList() { |
| | | const param = { |
| | | pageIndex: 1, |
| | | pageSize: 10000000, |
| | | } |
| | | measureList(param).then(res => { |
| | | if(res.code == 100){ |
| | | this.list = res.data; |
| | | } |
| | | }).catch(err=>{}) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack({ |
| | | url:'./detail/detail' |
| | |
| | | }, |
| | | |
| | | checkboxChange(n) { |
| | | console.log('change', n); |
| | | let finalArr = this.list.filter(item => !(n.indexOf(item.id) < 0)); |
| | | this.measureIds = finalArr.map((item) => { |
| | | return {id: item.id, baseMeasureContent: item.measure}; |
| | | }); |
| | | console.log('change', this.measureIds); |
| | | }, |
| | | submit() { |
| | | const param = { |
| | | id: this.detailData.id, |
| | | baseMeasures: this.measureIds, |
| | | responseMeasure: this.measures |
| | | } |
| | | submitMeasures(param).then(res => { |
| | | if(res.code == 100){ |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: '提交成功' |
| | | }); |
| | | this.goBack(); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | // 删除图片 |
| | | deletePic(event) { |
| | |
| | | uploadFilePromise(url) { |
| | | return new Promise((resolve, reject) => { |
| | | let a = uni.uploadFile({ |
| | | url: 'http://www.example.com', // 仅为示例,非真实的接口地址 |
| | | url: this.baseUrl + '/attachment/uploadMeasureImage/key', |
| | | filePath: url, |
| | | name: 'file', |
| | | header: { |
| | | 'tk':uni.getStorageSync('tk'), |
| | | 'uid': uni.getStorageSync('uid') |
| | | }, |
| | | formData: { |
| | | user: 'test' |
| | | id: this.detailData.id, |
| | | module: 'naturalDisasterPath' |
| | | }, |
| | | success: (res) => { |
| | | setTimeout(() => { |
| | |
| | | }); |
| | | } |
| | | } |
| | | }).catch(err=>{ |
| | | }) |
| | | }, |
| | | handleButtonClick(button) { |
| | |
| | | }, |
| | | clickSwitch(e) { |
| | | this.getNoticeList(); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | return { |
| | | data: { |
| | | pageIndex: 1, |
| | | pageSize: 1000 |
| | | pageSize: 10000000 |
| | | }, |
| | | // 状态栏高度 |
| | | statusBarHeight: 0, |
| | |
| | | <view class="measureCard"> |
| | | <view class="head"> |
| | | <u-form :model="form" ref="uForm" label-width="100px"> |
| | | <u-form-item label="信息标题 :" ></u-form-item> |
| | | <u-form-item label="发布单位 :"></u-form-item> |
| | | <u-form-item label="发布时间 :"></u-form-item> |
| | | <u-form-item label="反馈时间 :"></u-form-item> |
| | | <u-form-item label="信息标题 :" >{{form.title}}</u-form-item> |
| | | <u-form-item label="发布单位 :">{{form.publishingUnit}}</u-form-item> |
| | | <u-form-item label="发布时间 :">{{form.publishingTime}}</u-form-item> |
| | | <u-form-item label="反馈时间 :">{{form.measureSubmitTime}}</u-form-item> |
| | | </u-form> |
| | | </view> |
| | | <view class="first"> |
| | | <text style="font-size: 16px;margin-bottom: 20px;font-weight: 600;">基础措施</text> |
| | | <view v-for="(item, index) in measureList" :key="index" style="margin-left: 18px;margin-bottom:10px; font-size:16px;"> |
| | | <text style="margin-top: 15px;">{{item.name}}</text> |
| | | <text style="margin-top: 15px;">{{item}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="second"> |
| | | <text style="font-size: 16px;margin-bottom: 20px;font-weight: 600;">补充措施</text> |
| | | <u--textarea style="margin-top: -5px;" v-model="measures" disabled="true" placeholder="请输入内容" ></u--textarea> |
| | | <u--textarea style="margin-top: -5px;" v-model="measures" disabled placeholder="请输入内容" ></u--textarea> |
| | | </view> |
| | | <view class="third"> |
| | | <view v-for="(item, index) in images" :key="index"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import VUE_APP_BASE_URL from '../../../common/constant.js' |
| | | export default { |
| | | components:{ |
| | | |
| | |
| | | fileList1: [], |
| | | nameList: [], |
| | | checkboxValue1: '', |
| | | measures: "111", |
| | | measures: "", |
| | | type: 'textarea', |
| | | border: true, |
| | | height: 100, |
| | | autoHeight: true, |
| | | measureList: [ |
| | | { |
| | | name: '苹果', |
| | | form: { |
| | | }, |
| | | { |
| | | name: '香蕉', |
| | | }, |
| | | { |
| | | name: '橙子', |
| | | } |
| | | ], |
| | | images: [ |
| | | { |
| | | url: 'https://img2.baidu.com/it/u=638285213,1746517464&fm=253&fmt=auto&app=120&f=JPEG?w=1422&h=800' |
| | | }, |
| | | |
| | | ] |
| | | measureList: [], |
| | | images: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | //获取手机状态栏高度 |
| | | onLoad(options) { |
| | | let test = options.data && JSON.parse(decodeURIComponent(options.data)); |
| | | console.log("tes111t",test) |
| | | this.form = test; |
| | | this.measures = this.form.responseMeasure; |
| | | this.measureList = this.form.baseMeasures; |
| | | this.images = this.form.attachments.map((item) => { |
| | | return {url: VUE_APP_BASE_URL + item.attachment}; |
| | | }); |
| | | console.log("img",this.images) |
| | | this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; |
| | | uni.hideTabBar(); |
| | | }, |
| | |
| | | uni.navigateBack({ |
| | | url:'/pages/tabBar/responsivity/villageResponsivity' |
| | | }); |
| | | }, |
| | | |
| | | checkboxChange(n) { |
| | | console.log('change', n); |
| | | }, |
| | | // 删除图片 |
| | | deletePic(event) { |
| | | this[`fileList${event.name}`].splice(event.index, 1) |
| | | this.nameList.splice(event.index,1) |
| | | console.log("name",this.nameList) |
| | | }, |
| | | // 新增图片 |
| | | async afterRead(event) { |
| | | // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 |
| | | let lists = [].concat(event.file) |
| | | let fileListLen = this[`fileList${event.name}`].length |
| | | console.log("list",lists) |
| | | lists.map((item) => { |
| | | this.nameList.push({name: item.name}); |
| | | this[`fileList${event.name}`].push({ |
| | | ...item, |
| | | status: 'uploading', |
| | | message: '上传中' |
| | | }) |
| | | }) |
| | | console.log("nameList",this.nameList) |
| | | for (let i = 0; i < lists.length; i++) { |
| | | const result = await this.uploadFilePromise(lists[i].url) |
| | | let item = this[`fileList${event.name}`][fileListLen] |
| | | this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { |
| | | status: 'success', |
| | | message: '', |
| | | url: result |
| | | })) |
| | | fileListLen++ |
| | | } |
| | | }, |
| | | uploadFilePromise(url) { |
| | | return new Promise((resolve, reject) => { |
| | | let a = uni.uploadFile({ |
| | | url: 'http://www.example.com', // 仅为示例,非真实的接口地址 |
| | | filePath: url, |
| | | name: 'file', |
| | | formData: { |
| | | user: 'test' |
| | | }, |
| | | success: (res) => { |
| | | setTimeout(() => { |
| | | resolve(res.data.data) |
| | | }, 1000) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | //预览图片 |
| | | previewSqs(item,index) { |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view style="height: 85%;"> |
| | | <view style="height: 83%;"> |
| | | <!-- <web-view :src="webViewUrl"></web-view> --> |
| | | <iframe :src="webViewUrl" width="100%" height="100%"> </iframe> |
| | | </view> |