| | |
| | | // return |
| | | let code = this.getQueryVariable('code') |
| | | if (code) { |
| | | if (!uni.getStorageSync('code')) { |
| | | uni.setStorageSync('code', code); |
| | | |
| | | let res = await this.$u.api.login({ code: code }) |
| | | if (res.code === 200) { |
| | | this.$store.commit('setUserInfo', res.data) |
| | |
| | | if (url.indexOf('state=') !== -1 && url.indexOf('#') !== -1) { |
| | | let value = url.substring(url.indexOf('state=') + 6, url.indexOf('#')).split('_') |
| | | console.log(value) |
| | | if (value.length > 0) { |
| | | if (value[0] !== '') { |
| | | if (value[0] == 0) { |
| | | uni.navigateTo({ |
| | | url: `/pages/details_she/details_she?id=${value[1]}` |
| | |
| | | } |
| | | } |
| | | } |
| | | } else if (uni.getStorageSync('code') !== code) { |
| | | |
| | | uni.setStorageSync('code', code); |
| | | |
| | | let res = await this.$u.api.login({ code: code }) |
| | | if (res.code === 200) { |
| | | this.$store.commit('setUserInfo', res.data) |
| | | this.initRegister() |
| | | |
| | | // 判断是否跳转详情 |
| | | let url = window.location.href |
| | | if (url.indexOf('state=') !== -1 && url.indexOf('#') !== -1) { |
| | | let value = url.substring(url.indexOf('state=') + 6, url.indexOf('#')).split('_') |
| | | console.log(value) |
| | | if (value[0] !== '') { |
| | | if (value[0] == 0) { |
| | | uni.navigateTo({ |
| | | url: `/pages/details_she/details_she?id=${value[1]}` |
| | | }) |
| | | } else if (value[0] == 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/workOrder_dca/workOrder_dca?id=${value[1]}` |
| | | }) |
| | | } else if (value[0] == 3) { |
| | | uni.navigateTo({ |
| | | url: `/pages/workOrder_she/workOrder_she?id=${value[1]}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | let loc_href = encodeURIComponent("https://dmtest.ahapp.net/lianhelihua_web/") |
| | | |
| | |
| | | |
| | | location.href = wxUrl; |
| | | } |
| | | } else { |
| | | let loc_href = encodeURIComponent("https://dmtest.ahapp.net/lianhelihua_web/") |
| | | |
| | | let corpId = 'wweea8f71b54e3b835'; |
| | | let agentId = '1000095'; |
| | | |
| | | let wxUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${corpId}&redirect_uri=${loc_href}&response_type=code&scope=snsapi_base&state=#wechat_redirect` |
| | | |
| | | location.href = wxUrl; |
| | | } |
| | | // ShiXuHui |
| | | // if (!this.$store.state.userInfo) { |
| | | // let res = await this.$u.api.login({ code: 'GuoJiWenWu' }) |
| | | // if (res.code === 200) { |
| | | // this.$store.commit('setUserInfo', res.data) |
| | | // } |
| | | // } |
| | | // return |
| | | // let code = this.getQueryVariable('code') |
| | | // if (code) { |
| | | // let res = await this.$u.api.login({ code: code }) |
| | | // if (res.code === 200) { |
| | | // this.$store.commit('setUserInfo', res.data) |
| | | // this.initRegister() |
| | | |
| | | // // 判断是否跳转详情 |
| | | // let url = window.location.href |
| | | // if (url.indexOf('state=') !== -1 && url.indexOf('#') !== -1) { |
| | | // let value = url.substring(url.indexOf('state=') + 6, url.indexOf('#')).split('_') |
| | | // console.log(value) |
| | | // if (value[0] !== '') { |
| | | // if (value[0] == 0) { |
| | | // uni.navigateTo({ |
| | | // url: `/pages/details_she/details_she?id=${value[1]}` |
| | | // }) |
| | | // } else if (value[0] == 1) { |
| | | // uni.navigateTo({ |
| | | // url: `/pages/workOrder_dca/workOrder_dca?id=${value[1]}` |
| | | // }) |
| | | // } else if (value[0] == 3) { |
| | | // uni.navigateTo({ |
| | | // url: `/pages/workOrder_she/workOrder_she?id=${value[1]}` |
| | | // }) |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } else { |
| | | // let loc_href = encodeURIComponent("https://dmtest.ahapp.net/lianhelihua_web/") |
| | | |
| | | // let corpId = 'wweea8f71b54e3b835'; |
| | | // let agentId = '1000095'; |
| | | |
| | | // let wxUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${corpId}&redirect_uri=${loc_href}&response_type=code&scope=snsapi_base&state=#wechat_redirect` |
| | | |
| | | // location.href = wxUrl; |
| | | // } |
| | | }, |
| | | // 获取url参数 |
| | | getQueryVariable(variable) { |
| | |
| | | { |
| | | name: '不符合数', |
| | | type: 'bar', |
| | | label: { |
| | | show: true, |
| | | color: '#3875C5', |
| | | position: 'right' |
| | | }, |
| | | data: [] |
| | | }, |
| | | { |
| | | name: '已解决数', |
| | | type: 'bar', |
| | | label: { |
| | | show: true, |
| | | color: '#3875C5', |
| | | position: 'right' |
| | | }, |
| | | data: [] |
| | | } |
| | | ] |
| | |
| | | |
| | | .chat { |
| | | width: 100%; |
| | | height: 500rpx; |
| | | height: 800rpx; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | margin-top: 90rpx; |
| | |
| | | <view class="dca_list_item" style="flex-direction: column;"> |
| | | <view class="dca_list_item_label">DCA图片</view> |
| | | <view class="dca_list_item_tu" v-if="info.multifileList"> |
| | | <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index"> |
| | | <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index" @click="previewImage(item.fileurlFull, info.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="dca_list_item_tu_zw"></view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 任务分配 --> |
| | | <!-- 抄送 --> |
| | | <u-popup :show="show" :round="10" mode="bottom"> |
| | | <view class="fp"> |
| | | <view class="fp_head"> |
| | |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <!-- 抄送人 --> |
| | | <peng-tree |
| | | ref="pengTree" |
| | | :range="userList" |
| | | idKey="qwId" |
| | | :selectParent="false" |
| | | nameKey="name" |
| | | :multiple="true" |
| | | title="选择抄送人" |
| | | @confirm="selectUser" |
| | | @cancel="$refs.pengTree._hide()"> |
| | | </peng-tree> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import pengTree from '@/uni_modules/peng-tree/peng-tree/peng-tree.vue' |
| | | export default { |
| | | components: { pengTree }, |
| | | data() { |
| | | return { |
| | | id: null, |
| | |
| | | message: '抄送人不能为空', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | } |
| | | }, |
| | | userList: [] |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | this.id = option.id |
| | | this.isShow = option.isShow |
| | | this.getDetails() |
| | | this.getUserInfo() |
| | | |
| | | uni.$on('update', (data) => { |
| | | this.getDetails() |
| | | }) |
| | | }, |
| | | methods: { |
| | | seleUser() { |
| | | var that = this |
| | | that.$ww.selectEnterpriseContact({ |
| | | fromDepartmentId: -1, |
| | | mode: 'multi', |
| | | type: ['user'], |
| | | }).then(res =>{ |
| | | console.log(res) |
| | | if (res.errCode === 0) { |
| | | that.model.passOnUserName = res.result.userList.map(item => item.name).join(',') |
| | | that.model.passOnUserId = res.result.userList.map(item => item.id).join(',') |
| | | } |
| | | selectUser(e) { |
| | | this.canScroll() |
| | | this.model.passOnUserName = e.map(item => item.name).join(',') |
| | | this.model.passOnUserId = e.map(item => item.id).join(',') |
| | | this.$refs.pengTree._hide() |
| | | }, |
| | | async getUserInfo() { |
| | | let res = await this.$u.api.getCopySendUserPage({ |
| | | capacity: 9999, |
| | | page: 1, |
| | | model: {} |
| | | }) |
| | | if (res.code === 200) { |
| | | console.log(res) |
| | | this.userList = res.data.records |
| | | } |
| | | }, |
| | | previewImage(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | | urls |
| | | }); |
| | | }, |
| | | seleUser() { |
| | | this.stopScroll() |
| | | this.$refs.pengTree._show() |
| | | // var that = this |
| | | // that.$ww.selectEnterpriseContact({ |
| | | // fromDepartmentId: -1, |
| | | // mode: 'multi', |
| | | // type: ['user'], |
| | | // }).then(res =>{ |
| | | // console.log(res) |
| | | // if (res.errCode === 0) { |
| | | // that.model.passOnUserName = res.result.userList.map(item => item.name).join(',') |
| | | // that.model.passOnUserId = res.result.userList.map(item => item.id).join(',') |
| | | // } |
| | | // }) |
| | | }, |
| | | returnStatus(status) { |
| | | if ([3,4,5].includes(status)) { |
| | |
| | | <view class="box_item_label">是否外部就医</view> |
| | | <view class="box_item_value">{{isTrue(info.outJiuyi)}}</view> |
| | | </view> |
| | | <view class="box_item"> |
| | | <view class="box_item" v-if="info.outJiuyi == '0'"> |
| | | <view class="box_item_label">是否医务室</view> |
| | | <view class="box_item_value">{{isTrue(info.isYiwushi)}}</view> |
| | | </view> |
| | | <view class="box_item"> |
| | | <view class="box_item" v-if="info.isYiwushi === '0'"> |
| | | <view class="box_item_label">是否受伤</view> |
| | | <view class="box_item_value">{{isTrue(info.isHurted)}}</view> |
| | | </view> |
| | |
| | | <view class="box_item" style="flex-direction: column;"> |
| | | <view class="box_item_label">图片</view> |
| | | <view class="box_item_tu" v-if="info.multifileList"> |
| | | <view class="box_item_tu_item" v-for="(item, index) in info.multifileList" :key="index"> |
| | | <view class="box_item_tu_item" v-for="(item, index) in info.multifileList" :key="index" @click="previewImage(item.fileurlFull, info.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="box_item_tu_zw"></view> |
| | |
| | | this.getDetails() |
| | | }, |
| | | methods: { |
| | | previewImage(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | | urls |
| | | }); |
| | | }, |
| | | getDetails() { |
| | | this.$u.api.detail({ id: this.id }) |
| | | .then(res => { |
| | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.getList() |
| | | this.getLocation() |
| | | this.getLocation1() |
| | | }, |
| | | onShow() { |
| | | this.show = false |
| | | this.show1 = false |
| | | this.$nextTick(() => { |
| | | this.$refs.pengTree._hide() |
| | | this.$refs.pengTree1._hide() |
| | | }) |
| | | this.search.page = 1 |
| | | this.search.next = true |
| | | this.list = [] |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | this.getList() |
| | | }, |
| | |
| | | :fileList="model.multifileList" |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | multiple |
| | | name="1" |
| | | style="margin-top: 15rpx;" /> |
| | | </u-form-item> |
| | |
| | | this.show2 = false |
| | | }, |
| | | next() { |
| | | this.model.submitDate = '' |
| | | this.model.happenTime = '' |
| | | this.model.companyName = '' |
| | | this.model.localtionName = '' |
| | | this.model.localtionId = '' |
| | | this.model.typeId = '' |
| | | this.model.typeName = '' |
| | | this.model.notifier = '' |
| | | this.model.dcaYesNum = 0 |
| | | this.model.dcaNoNum = 0 |
| | | this.model.dcaNoProblemDTOList = [] |
| | | this.model.multifileList = [] |
| | | this.model.type = 1 |
| | | this.canScroll() |
| | | this.show6 = false |
| | | }, |
| | |
| | | }, |
| | | // 新增图片 |
| | | async afterRead(event) { |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/upload', |
| | | filePath: event.file.url, |
| | | name: "file", |
| | | url: this.$baseUrl + '/web/public/uploadBatch', |
| | | files: event.file.map(e => { |
| | | return { name: 'files', uri: e.url } |
| | | }), |
| | | formData: { |
| | | folder: "WORKORDER_FILE_PATH" |
| | | folder: "WORKORDER_FILE_PATH", |
| | | }, |
| | | success: (res) => { |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | obj.data.fileurl = obj.data.imgaddr |
| | | this.model.multifileList.push(obj.data) |
| | | console.log(obj.data) |
| | | obj.data.forEach(item => { |
| | | item.fileurl = item.imgaddr |
| | | }) |
| | | that.model.multifileList = [...that.model.multifileList, ...obj.data] |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/web/public/upload', |
| | | // filePath: event.file.url, |
| | | // name: "file", |
| | | // formData: { |
| | | // folder: "WORKORDER_FILE_PATH" |
| | | // }, |
| | | // success: (res) => { |
| | | // let obj = JSON.parse(res.data) |
| | | // if (obj.code === 200) { |
| | | // obj.data.fileurl = obj.data.imgaddr |
| | | // this.model.multifileList.push(obj.data) |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | submit() { |
| | | this.$refs.uForm.validate().then(res => { |
| | | if (this.total === 0) return uni.showToast({ |
| | | title: '请选择观察项', |
| | | icon: 'none' |
| | | }) |
| | | this.show4 = true |
| | | }).catch(errors => { |
| | | |
| | |
| | | <u--input v-model="model.remark" border="none" placeholder="如选择其它区域请务必填写具体位置"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="是否外部就医" labelWidth="120" prop="outJiuyi" borderBottom required> |
| | | <u-radio-group v-model="model.outJiuyi" placement="row"> |
| | | <u-radio-group v-model="model.outJiuyi" placement="row" @change="model.isYiwushi = ''; model.isHurted = ''"> |
| | | <u-radio label="否" name="0"></u-radio> |
| | | <u-radio label="是" name="1"></u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="是否医务室" labelWidth="120" prop="isYiwushi" borderBottom required> |
| | | <u-radio-group v-model="model.isYiwushi" placement="row"> |
| | | <u-form-item label="是否医务室" labelWidth="120" prop="isYiwushi" borderBottom required v-if="model.outJiuyi === '0'"> |
| | | <u-radio-group v-model="model.isYiwushi" placement="row" @change="model.isHurted = ''"> |
| | | <u-radio label="否" name="0"></u-radio> |
| | | <u-radio label="是" name="1"></u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="是否受伤" labelWidth="120" prop="isHurted" borderBottom required> |
| | | <u-form-item label="是否受伤" labelWidth="120" prop="isHurted" borderBottom required v-if="model.isYiwushi === '0'"> |
| | | <u-radio-group v-model="model.isHurted" placement="row"> |
| | | <u-radio label="否" name="0"></u-radio> |
| | | <u-radio label="是" name="1"></u-radio> |
| | |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | accept="image" |
| | | multiple |
| | | name="1" |
| | | style="margin-top: 15rpx;"></u-upload> |
| | | </u-form-item> |
| | |
| | | } |
| | | }, |
| | | next() { |
| | | this.model.name = '' |
| | | this.model.submitDate = uni.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM') |
| | | this.model.companyName = '' |
| | | this.model.happenTime = '' |
| | | this.model.memberType = '' |
| | | this.model.memberTypeName = '' |
| | | this.model.memberNames = '' |
| | | this.model.memberQwids = '' |
| | | this.model.localtionId = '' |
| | | this.model.localtionName = '' |
| | | this.model.remark = '' |
| | | this.model.outJiuyi = '' |
| | | this.model.isYiwushi = '' |
| | | this.model.isHurted = '' |
| | | this.model.typeId = '' |
| | | this.model.typeName = '' |
| | | this.model.workRelated = '' |
| | | this.model.eventInfo = '' |
| | | this.model.multifileList = [] |
| | | this.model.fileList = [] |
| | | this.model.type = 0 |
| | | this.canScroll() |
| | | this.show4 = false |
| | | }, |
| | |
| | | }, |
| | | // 新增图片 |
| | | async afterRead(event) { |
| | | // event.file.forEach(async (item) => { |
| | | // const filePath = item.url |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/web/public/upload', |
| | | // filePath, |
| | | // name: "file", |
| | | // formData: { |
| | | // folder: "WORKORDER_FILE_PATH" |
| | | // }, |
| | | // success: (res) => { |
| | | // let obj = JSON.parse(res.data) |
| | | // if (obj.code === 200) { |
| | | // obj.data.fileurl = obj.data.imgaddr |
| | | // this.model.multifileList.push(obj.data) |
| | | // } |
| | | // } |
| | | // }); |
| | | // }) |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/upload', |
| | | filePath: event.file.url, |
| | | name: "file", |
| | | url: this.$baseUrl + '/web/public/uploadBatch', |
| | | files: event.file.map(e => { |
| | | return { name: 'files', uri: e.url } |
| | | }), |
| | | formData: { |
| | | folder: "WORKORDER_FILE_PATH" |
| | | folder: "WORKORDER_FILE_PATH", |
| | | }, |
| | | success: (res) => { |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | obj.data.fileurl = obj.data.imgaddr |
| | | this.model.multifileList.push(obj.data) |
| | | console.log(obj.data) |
| | | obj.data.forEach(item => { |
| | | item.fileurl = item.imgaddr |
| | | }) |
| | | that.model.multifileList = [...that.model.multifileList, ...obj.data] |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | // 提交 |
| | | submit() { |
| | | var that = this |
| | | that.$refs.uForm.validate().then(async () => { |
| | | let res = await that.$u.api.workOrderCreate(that.model) |
| | | let form = JSON.parse(JSON.stringify(that.model)) |
| | | form.submitDate = form.submitDate + ':00' |
| | | form.happenTime = form.happenTime + ':00' |
| | | let res = await that.$u.api.workOrderCreate(form) |
| | | if (res.code === 200) { |
| | | that.id = res.data |
| | | this.stopScroll() |
| | |
| | | <view class="box_item" style="flex-direction: column;"> |
| | | <view class="box_item_label">图片</view> |
| | | <view class="box_item_tu" v-if="info.multifileList"> |
| | | <view class="box_item_tu_item" v-for="(item, index) in info.multifileList" :key="index"> |
| | | <view class="box_item_tu_item" v-for="(item, index) in info.multifileList" :key="index" @click="previewImage(item.fileurlFull, info.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="box_item_tu_zw"></view> |
| | |
| | | console.log(res) |
| | | this.info = res.data |
| | | }) |
| | | } |
| | | }, |
| | | previewImage(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | | urls |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | }, |
| | | next() { |
| | | this.model.name = '' |
| | | this.model.submitDate = uni.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM:ss') |
| | | this.model.companyName = '' |
| | | this.model.happenTime = '' |
| | | this.model.localtionId = '' |
| | | this.model.localtionName = '' |
| | | this.model.typeId = '' |
| | | this.model.typeName = '' |
| | | this.model.riskInfo = '' |
| | | this.model.notifier = '' |
| | | this.model.multifileList = [] |
| | | this.model.type = 3 |
| | | this.canScroll() |
| | | this.show4 = false |
| | | }, |
| | |
| | | // 新增图片 |
| | | async afterRead(event) { |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: that.$baseUrl + '/web/public/upload', |
| | | filePath: event.file.url, |
| | |
| | | folder: "WORKORDER_FILE_PATH" |
| | | }, |
| | | success: (res) => { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | obj.data.fileurl = obj.data.imgaddr |
| | |
| | | :fileList="child.multifileList" |
| | | @afterRead="afterRead($event, a, b)" |
| | | @delete="deletePic($event, a, b)" |
| | | :name="(b + 1).toString()" /> |
| | | :name="(b + 1).toString()" |
| | | multiple /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </u-collapse-item> |
| | | </template> |
| | | </u-collapse> |
| | | <view style="padding: 0 30rpx; box-sizing: border-box;" v-if="!workOrderId"> |
| | | <view style="padding: 0 30rpx calc(env(safe-area-inset-bottom) + 30rpx) 30rpx; box-sizing: border-box;" v-if="!workOrderId"> |
| | | <u-button type="primary" text="提交" @click="submit" style="margin-top: 60rpx;"></u-button> |
| | | </view> |
| | | </view> |
| | |
| | | let dcaNoProblemDTOList = [] |
| | | for (let i = 0; i < this.list.length; i++) { |
| | | for (let b = 0; b < this.list[i].childList.length; b++) { |
| | | if (!this.list[i].childList[b].value || !this.list[i].childList[b].eventInfo) { |
| | | console.log(this.list[i].childList[b].value, this.list[i].childList[b].eventInfo) |
| | | if (!this.list[i].childList[b].value) { |
| | | return uni.showToast({ |
| | | title: '请先完善上述所有问题再提交', |
| | | title: '请先完善上述所有单选项', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | if (this.list[i].childList[b].value === '2' && !this.list[i].childList[b].eventInfo) { |
| | | return uni.showToast({ |
| | | title: '请先完善上述所有不符合原因', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | |
| | | }, |
| | | // 获取题目 |
| | | async getList() { |
| | | let res = await this.$u.api.categoryTree({ categoryType: '4,6', categoryId: this.id }) |
| | | let res = await this.$u.api.getCategoryVOForGCXTree({ categoryId: this.id }) |
| | | if (res.code === 200) { |
| | | res.data[0].childList.forEach(item => { |
| | | this.list.push(item) |
| | |
| | | // 上传图片 |
| | | async afterRead(event, a, b) { |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/upload', |
| | | filePath: event.file.url, |
| | | name: "file", |
| | | url: this.$baseUrl + '/web/public/uploadBatch', |
| | | files: event.file.map(e => { |
| | | return { name: 'files', uri: e.url } |
| | | }), |
| | | formData: { |
| | | folder: "WORKORDER_FILE_PATH" |
| | | folder: "WORKORDER_FILE_PATH", |
| | | }, |
| | | success: (res) => { |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | obj.data.fileurl = obj.data.imgaddr |
| | | that.list[a].childList[b].multifileList.push(obj.data) |
| | | console.log(obj.data) |
| | | obj.data.forEach(item => { |
| | | item.fileurl = item.imgaddr |
| | | }) |
| | | that.list[a].childList[b].multifileList = [...that.list[a].childList[b].multifileList, ...obj.data] |
| | | that.$refs.collapse.init() |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | // var that = this |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/web/public/upload', |
| | | // filePath: event.file.url, |
| | | // name: "file", |
| | | // formData: { |
| | | // folder: "WORKORDER_FILE_PATH" |
| | | // }, |
| | | // success: (res) => { |
| | | // let obj = JSON.parse(res.data) |
| | | // if (obj.code === 200) { |
| | | // obj.data.fileurl = obj.data.imgaddr |
| | | // that.list[a].childList[b].multifileList.push(obj.data) |
| | | // that.$refs.collapse.init() |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | } |
| | | } |
| | |
| | | <view class="report_list_row_icon"> |
| | | <image src="/static/tabbar/nav_gongdan_sel@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="report_list_row_info" v-if="[0,3].includes(item.type)"> |
| | | <view class="report_list_row_info" v-if="[0].includes(item.type)"> |
| | | <text>{{titleType(item.type)}}</text> |
| | | <text>{{userType(item.memberType)}}-{{item.memberNames}} {{item.happenTime}}/{{item.locationName}}/{{item.typeName}}</text> |
| | | <text>{{userType(item.memberType)}}-{{item.memberNames}} {{item.happenTime.substring(0, 16)}}/{{item.locationName}}/{{item.typeName}}</text> |
| | | <text>{{item.submitDate.substring(0, 16)}}</text> |
| | | </view> |
| | | <view class="report_list_row_info" v-else-if="[3].includes(item.type)"> |
| | | <text>{{titleType(item.type)}}</text> |
| | | <text>{{item.happenTime.substring(0, 16)}}/{{item.locationName}}/{{item.typeName}}</text> |
| | | <text>{{item.submitDate.substring(0, 16)}}</text> |
| | | </view> |
| | | <view class="report_list_row_info1" v-else> |
| | | <text>DCA</text> |
| | | <text>{{item.typeName || '-'}}/{{item.categoryName || '-'}}</text> |
| | | <text>符合:{{item.dcaYesNum}} 不符合:{{item.dcaNoNum}}</text> |
| | | <text>{{item.createDate}}</text> |
| | | <text>{{item.createDate.substring(0, 16)}}</text> |
| | | </view> |
| | | <view class="report_list_row_dian success" v-if="[3,4,5].includes(item.status)"></view> |
| | | <view class="report_list_row_dian error" v-else-if="[0,1,2].includes(item.status)"></view> |
| | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.getList() |
| | | this.getLocation() |
| | | this.getLocation1() |
| | | }, |
| | | onShow() { |
| | | this.$nextTick(() => { |
| | | this.$refs.pengTree._hide() |
| | | this.$refs.pengTree1._hide() |
| | | }) |
| | | this.show = false |
| | | this.show1 = false |
| | | this.search.page = 1 |
| | | this.search.next = true |
| | | this.list = [] |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | this.getList() |
| | |
| | | this.$refs.pengTree._hide() |
| | | }, |
| | | // 位置 |
| | | selectAddress(e) { |
| | | selectAddress1(e) { |
| | | this.localtionId = e[0].id |
| | | this.locationName = e[0].name |
| | | this.search.page = 1 |
| | |
| | | <view class="dca_list_item" style="flex-direction: column;"> |
| | | <view class="dca_list_item_label">图片</view> |
| | | <view class="dca_list_item_tu" v-if="info.multifileList"> |
| | | <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index"> |
| | | <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index" @click="previewImage(item.fileurlFull, info.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="dca_list_item_tu_zw"></view> |
| | |
| | | <view class="lc"> |
| | | <view class="lc_item" v-for="(item, index) in info.logList" :key="index"> |
| | | <view class="lc_item_dian"></view> |
| | | <view class="lc_item_xian" v-if="info.logList.length === 1 ? false : index === 0"></view> |
| | | <view class="lc_item_xian" v-if="info.logList.length === 1 ? false : index !== info.logList.length - 1"></view> |
| | | <view class="lc_item_title">{{item.title}}</view> |
| | | <view class="lc_item_info">{{item.companyName}}/{{item.userName}} {{item.createDate}}</view> |
| | | <view class="lc_item_content" v-if="![0,4].includes(item.objType)"> |
| | |
| | | <view class="lc_item_content_item"> |
| | | <view class="lc_item_content_item_label">图片:</view> |
| | | <view class="lc_item_content_item_img" v-if="item.multifileList"> |
| | | <view class="image" v-for="(item, index) in item.multifileList" :key="index"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | <view class="image" v-for="(child, index) in item.multifileList" :key="index" @click="previewImage(child.fileurlFull, item.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="child.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="imagezw"></view> |
| | | <view class="imagezw"></view> |
| | |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="2" |
| | | multiple |
| | | style="margin-top: 15rpx;" /> |
| | | </u-form-item> |
| | | </u--form> |
| | |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="1" |
| | | multiple |
| | | style="margin-top: 15rpx;" /> |
| | | </u-form-item> |
| | | </u--form> |
| | |
| | | this.getDetails() |
| | | }, |
| | | methods: { |
| | | previewImage(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | | urls |
| | | }); |
| | | }, |
| | | closeGB() { |
| | | this.canScroll() |
| | | this.show1 = false |
| | |
| | | }).then(res =>{ |
| | | console.log(res) |
| | | if (res.errCode === 0) { |
| | | this.model.passOnUserName = res.result.userList.map(item => item.name) |
| | | this.model.passOnUserId = res.result.userList.map(item => item.id) |
| | | this.model.passOnUserName = res.result.userList.map(item => item.name).join(',') |
| | | this.model.passOnUserId = res.result.userList.map(item => item.id).join(',') |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '操作成功', icon: 'none' }) |
| | | that.canScroll() |
| | | uni.$emit('update') |
| | | that.show = false |
| | | that.getDetails() |
| | | } |
| | |
| | | workorderId: that.info.id |
| | | }) |
| | | if (res.code === 200) { |
| | | uni.$emit('update') |
| | | uni.showToast({ title: '操作成功', icon: 'none' }) |
| | | that.canScroll() |
| | | that.show1 = false |
| | |
| | | }, |
| | | // 新增图片 |
| | | afterRead(event) { |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/upload', |
| | | filePath: event.file.url, |
| | | name: "file", |
| | | url: this.$baseUrl + '/web/public/uploadBatch', |
| | | files: event.file.map(e => { |
| | | return { name: 'files', uri: e.url } |
| | | }), |
| | | formData: { |
| | | folder: "WORKORDER_LOG_FILE_PATH" |
| | | folder: "WORKORDER_LOG_FILE_PATH", |
| | | }, |
| | | success: (res) => { |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | obj.data.fileurl = obj.data.imgaddr |
| | | this.model.multifileList.push(obj.data) |
| | | console.log(obj.data) |
| | | obj.data.forEach(item => { |
| | | item.fileurl = item.imgaddr |
| | | }) |
| | | that.model.multifileList = [...that.model.multifileList, ...obj.data] |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/web/public/upload', |
| | | // filePath: event.file.url, |
| | | // name: "file", |
| | | // formData: { |
| | | // folder: "WORKORDER_LOG_FILE_PATH" |
| | | // }, |
| | | // success: (res) => { |
| | | // let obj = JSON.parse(res.data) |
| | | // if (obj.code === 200) { |
| | | // obj.data.fileurl = obj.data.imgaddr |
| | | // this.model.multifileList.push(obj.data) |
| | | // } |
| | | // } |
| | | // }); |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="dca_list_item" style="flex-direction: column;"> |
| | | <view class="dca_list_item_label">图片</view> |
| | | <view class="dca_list_item_tu" v-if="info.multifileList"> |
| | | <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index"> |
| | | <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index" @click="previewImage(item.fileurlFull, info.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="dca_list_item_tu_zw"></view> |
| | |
| | | <view class="lc"> |
| | | <view class="lc_item" v-for="(item, index) in info.logList" :key="index"> |
| | | <view class="lc_item_dian"></view> |
| | | <view class="lc_item_xian" v-if="info.logList.length === 1 ? false : index === 0"></view> |
| | | <view class="lc_item_xian" v-if="info.logList.length === 1 ? false : index !== info.logList.length - 1"></view> |
| | | <view class="lc_item_title">{{item.title}}</view> |
| | | <view class="lc_item_info">{{item.companyName}}/{{item.userName}} {{item.createDate}}</view> |
| | | <view class="lc_item_content" v-if="![0,4].includes(item.objType)"> |
| | |
| | | <view class="lc_item_content_item"> |
| | | <view class="lc_item_content_item_label">图片:</view> |
| | | <view class="lc_item_content_item_img" v-if="item.multifileList"> |
| | | <view class="image" v-for="(item, index) in item.multifileList" :key="index"> |
| | | <image :src="item.fileurlFull" mode="widthFix"></image> |
| | | <view class="image" v-for="(child, index) in item.multifileList" :key="index" @click="previewImage(child.fileurlFull, item.multifileList.map(item => item.fileurlFull))"> |
| | | <image :src="child.fileurlFull" mode="widthFix"></image> |
| | | </view> |
| | | <view class="imagezw"></view> |
| | | <view class="imagezw"></view> |
| | |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="2" |
| | | multiple |
| | | style="margin-top: 15rpx;" /> |
| | | </u-form-item> |
| | | </u--form> |
| | |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="1" |
| | | multiple |
| | | style="margin-top: 15rpx;" /> |
| | | </u-form-item> |
| | | </u--form> |
| | |
| | | this.getDetails() |
| | | }, |
| | | methods: { |
| | | previewImage(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | | urls |
| | | }); |
| | | }, |
| | | openGB() { |
| | | this.stopScroll() |
| | | this.show1 = true |
| | |
| | | }, |
| | | // 新增图片 |
| | | afterRead(event) { |
| | | var that = this |
| | | uni.showLoading({ title: '上传中...', mask: true }) |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/upload', |
| | | filePath: event.file.url, |
| | | name: "file", |
| | | url: this.$baseUrl + '/web/public/uploadBatch', |
| | | files: event.file.map(e => { |
| | | return { name: 'files', uri: e.url } |
| | | }), |
| | | formData: { |
| | | folder: "WORKORDER_LOG_FILE_PATH" |
| | | folder: "WORKORDER_LOG_FILE_PATH", |
| | | }, |
| | | success: (res) => { |
| | | success(res) { |
| | | uni.hideLoading(); |
| | | let obj = JSON.parse(res.data) |
| | | if (obj.code === 200) { |
| | | obj.data.fileurl = obj.data.imgaddr |
| | | this.model.multifileList.push(obj.data) |
| | | console.log(obj.data) |
| | | obj.data.forEach(item => { |
| | | item.fileurl = item.imgaddr |
| | | }) |
| | | that.model.multifileList = [...that.model.multifileList, ...obj.data] |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | // uni.uploadFile({ |
| | | // url: this.$baseUrl + '/web/public/upload', |
| | | // filePath: event.file.url, |
| | | // name: "file", |
| | | // formData: { |
| | | // folder: "WORKORDER_LOG_FILE_PATH" |
| | | // }, |
| | | // success: (res) => { |
| | | // let obj = JSON.parse(res.data) |
| | | // if (obj.code === 200) { |
| | | // obj.data.fileurl = obj.data.imgaddr |
| | | // this.model.multifileList.push(obj.data) |
| | | // } |
| | | // } |
| | | // }); |
| | | } |
| | | } |
| | | } |
| | |
| | | right: 0rpx; |
| | | bottom: 0rpx; |
| | | left: 0rpx; |
| | | z-index: 9999; |
| | | z-index: 999999; |
| | | top: 360rpx; |
| | | transition: all 0.3s ease; |
| | | transform: translateY(100%); |
| | |
| | | let categoryTree = (params = {}) => vm.$u.http.get('web/category/categoryTree', { params }); // 查询树 |
| | | let workOrderCreate = (data = {}) => vm.$u.http.post('web/workOrder/create', data); // 创建工单 |
| | | let upload = (data = {}) => vm.$u.http.post('web/public/upload', data); // 上传 |
| | | let uploadBatch = (data = {}) => vm.$u.http.post('web/public/uploadBatch', data); // 批量上传文件到FTP |
| | | let detail = (params = {}) => vm.$u.http.get('web/workOrder/detail', { params }); // 风险上报详情 |
| | | let managersList = (data = {}) => vm.$u.http.post('web/workOrder/managersList', data); // 上传 |
| | | let categoryList = (params = {}) => vm.$u.http.get('web/category/categoryList', { params }); // 获取分类类别获取分类列表 |
| | |
| | | let urge = (params = {}) => vm.$u.http.get('web/workOrder/urge', { params }); // 工单催促 |
| | | let sendCopy = (data = {}) => vm.$u.http.post('web/workOrder/sendCopy', data); // 工单抄送 |
| | | let getQwSignature = (data = {}) => vm.$u.http.post('web/member/getQwSignature', data); // 获取titket |
| | | let getCategoryVOForGCXTree = (params = {}) => vm.$u.http.get('web/category/getCategoryVOForGCXTree', { params }); // 查询树 |
| | | let getCopySendUserPage = (data = {}) => vm.$u.http.post('web/member/getCopySendUserPage', data); // 查询可被抄送人分页 |
| | | |
| | | vm.$u.api = { |
| | | login, |
| | |
| | | closeWorkOrder, |
| | | urge, |
| | | sendCopy, |
| | | getQwSignature |
| | | getQwSignature, |
| | | uploadBatch, |
| | | getCategoryVOForGCXTree, |
| | | getCopySendUserPage |
| | | }; |
| | | } |
| | | |