From 015b4f31cebbecf6f6da760ed2f8af3da721e802 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 18 四月 2025 16:17:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/riskDetails/riskDetails.vue | 10
h5/main.js | 4
h5/utils/http.api.js | 8
h5/pages/report_dca/report_dca.vue | 58 +++
h5/pages/details_she/details_she.vue | 12
h5/pages/type_dca/type_dca.vue | 67 ++++-
h5/pages/workOrder_she/workOrder_she.vue | 66 +++-
h5/pages/chart_details/chart_details.vue | 12
h5/pages/riskReporting/riskReporting.vue | 14 +
h5/pages/reporting_she/reporting_she.vue | 78 +++--
h5/utils/http.interceptor.js | 42 +--
h5/pages/details_dca/details_dca.vue | 79 ++++-
h5/pages/index/index.vue | 6
h5/pages/workOrder_dca/workOrder_dca.vue | 77 ++++-
h5/uni_modules/peng-tree/peng-tree/style.css | 2
h5/pages/workOrder/workOrder.vue | 29 +
h5/App.vue | 152 +++++++++--
h5/pages/report/report.vue | 13
18 files changed, 543 insertions(+), 186 deletions(-)
diff --git a/h5/App.vue b/h5/App.vue
index 9cacafa..8c4787c 100644
--- a/h5/App.vue
+++ b/h5/App.vue
@@ -11,52 +11,144 @@
},
methods: {
async init() {
- // if (!this.$store.state.userInfo) {
- // let res = await this.$u.api.login({ code: 'ShiXuHui' })
- // 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 (!this.$store.state.userInfo) {
+ let res = await this.$u.api.login({ code: 'ShiXuHui' })
if (res.code === 200) {
this.$store.commit('setUserInfo', res.data)
- this.initRegister()
+ }
+ }
+ return
+ let code = this.getQueryVariable('code')
+ if (code) {
+ if (!uni.getStorageSync('code')) {
+ uni.setStorageSync('code', code);
- // 鍒ゆ柇鏄惁璺宠浆璇︽儏
- 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.length > 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]}`
- })
+ 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/details_dca/details_dca?id=${value[1]}&isShow=true`
+ })
+ } else if (value[0] == 3) {
+ uni.navigateTo({
+ url: `/pages/workOrder_she/workOrder_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/details_dca/details_dca?id=${value[1]}&isShow=true`
+ })
+ } 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;
}
} 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) {
diff --git a/h5/main.js b/h5/main.js
index 4afe780..8ac3dd9 100644
--- a/h5/main.js
+++ b/h5/main.js
@@ -10,8 +10,8 @@
App.mpType = 'app'
Vue.use(uView);
-Vue.prototype.$baseUrl = 'https://dmtest.ahapp.net/lianhelihua_interface'
-// Vue.prototype.$baseUrl = 'http://192.168.0.135:10040'
+// Vue.prototype.$baseUrl = 'https://dmtest.ahapp.net/lianhelihua_interface'
+Vue.prototype.$baseUrl = 'http://192.168.0.131:10040'
Vue.prototype.$store = store;
Vue.prototype.$ww = ww;
Vue.prototype.$vConsole= new Vconsole()
diff --git a/h5/pages/chart_details/chart_details.vue b/h5/pages/chart_details/chart_details.vue
index 4feaab0..656fc41 100644
--- a/h5/pages/chart_details/chart_details.vue
+++ b/h5/pages/chart_details/chart_details.vue
@@ -190,11 +190,21 @@
{
name: '涓嶇鍚堟暟',
type: 'bar',
+ label: {
+ show: true,
+ color: '#3875C5',
+ position: 'right'
+ },
data: []
},
{
name: '宸茶В鍐虫暟',
type: 'bar',
+ label: {
+ show: true,
+ color: '#3875C5',
+ position: 'right'
+ },
data: []
}
]
@@ -398,7 +408,7 @@
.chat {
width: 100%;
- height: 500rpx;
+ height: 800rpx;
padding: 0 30rpx;
box-sizing: border-box;
margin-top: 90rpx;
diff --git a/h5/pages/details_dca/details_dca.vue b/h5/pages/details_dca/details_dca.vue
index 98ad51b..c8eb31f 100644
--- a/h5/pages/details_dca/details_dca.vue
+++ b/h5/pages/details_dca/details_dca.vue
@@ -36,7 +36,7 @@
<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>
@@ -59,13 +59,13 @@
<view class="dca_wt_list_item_info">
{{item.problemTitle}}
</view>
- <view class="dca_wt_list_item_btn">
+ <view class="dca_wt_list_item_btn" v-if="item.closeButton === 1">
<view class="btn" @click="handle(item.id)">澶勭悊</view>
</view>
</view>
</view>
</view>
- <!-- 浠诲姟鍒嗛厤 -->
+ <!-- 鎶勯�� -->
<u-popup :show="show" :round="10" mode="bottom">
<view class="fp">
<view class="fp_head">
@@ -87,11 +87,25 @@
</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,
@@ -110,28 +124,59 @@
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)) {
@@ -165,10 +210,10 @@
workorderId: that.info.id
})
if (res.code === 200) {
- uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
that.canScroll()
that.show = false
that.getDetails()
+ uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
}
}).catch(errors => {
diff --git a/h5/pages/details_she/details_she.vue b/h5/pages/details_she/details_she.vue
index 3105c8b..9f45673 100644
--- a/h5/pages/details_she/details_she.vue
+++ b/h5/pages/details_she/details_she.vue
@@ -35,11 +35,11 @@
<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>
@@ -58,7 +58,7 @@
<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>
@@ -82,6 +82,12 @@
this.getDetails()
},
methods: {
+ previewImage(current, urls) {
+ uni.previewImage({
+ current,
+ urls
+ });
+ },
getDetails() {
this.$u.api.detail({ id: this.id })
.then(res => {
diff --git a/h5/pages/index/index.vue b/h5/pages/index/index.vue
index 0acda3e..dfce10a 100644
--- a/h5/pages/index/index.vue
+++ b/h5/pages/index/index.vue
@@ -19,7 +19,7 @@
</view>
<image src="/static/bg_b.png" mode="widthFix"></image>
</view>
- <view class="index_list_item" @click="jump(3)">
+ <view class="index_list_item" @click="jump(3)" v-if="userInfo.dcaButton === 1">
<view class="index_list_item_info">
<text>娣卞害绗﹀悎鎬у鏌CA</text>
<text>DCA</text>
@@ -31,7 +31,11 @@
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['userInfo'])
+ },
data() {
return {
title: 'Hello'
diff --git a/h5/pages/report/report.vue b/h5/pages/report/report.vue
index e338def..b481c41 100644
--- a/h5/pages/report/report.vue
+++ b/h5/pages/report/report.vue
@@ -120,10 +120,21 @@
};
},
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()
},
diff --git a/h5/pages/report_dca/report_dca.vue b/h5/pages/report_dca/report_dca.vue
index 4a3cc72..0c857ff 100644
--- a/h5/pages/report_dca/report_dca.vue
+++ b/h5/pages/report_dca/report_dca.vue
@@ -37,6 +37,7 @@
:fileList="model.multifileList"
@afterRead="afterRead"
@delete="deletePic"
+ multiple
name="1"
style="margin-top: 15rpx;" />
</u-form-item>
@@ -189,6 +190,19 @@
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
},
@@ -264,24 +278,50 @@
},
// 鏂板鍥剧墖
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"
- },
- success: (res) => {
+ folder: "WORKORDER_FILE_PATH",
+ },
+ 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 => {
diff --git a/h5/pages/reporting_she/reporting_she.vue b/h5/pages/reporting_she/reporting_she.vue
index a842b81..09798b9 100644
--- a/h5/pages/reporting_she/reporting_she.vue
+++ b/h5/pages/reporting_she/reporting_she.vue
@@ -48,18 +48,18 @@
<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>
@@ -85,6 +85,7 @@
@afterRead="afterRead"
@delete="deletePic"
accept="image"
+ multiple
name="1"
style="margin-top: 15rpx;"></u-upload>
</u-form-item>
@@ -317,6 +318,27 @@
}
},
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
},
@@ -337,45 +359,37 @@
},
// 鏂板鍥剧墖
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"
- },
- success: (res) => {
+ folder: "WORKORDER_FILE_PATH",
+ },
+ 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()
diff --git a/h5/pages/riskDetails/riskDetails.vue b/h5/pages/riskDetails/riskDetails.vue
index e12b7b6..95d2d1b 100644
--- a/h5/pages/riskDetails/riskDetails.vue
+++ b/h5/pages/riskDetails/riskDetails.vue
@@ -31,7 +31,7 @@
<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>
@@ -61,7 +61,13 @@
console.log(res)
this.info = res.data
})
- }
+ },
+ previewImage(current, urls) {
+ uni.previewImage({
+ current,
+ urls
+ });
+ },
}
}
</script>
diff --git a/h5/pages/riskReporting/riskReporting.vue b/h5/pages/riskReporting/riskReporting.vue
index 543e27a..c413af3 100644
--- a/h5/pages/riskReporting/riskReporting.vue
+++ b/h5/pages/riskReporting/riskReporting.vue
@@ -206,6 +206,18 @@
}
},
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
},
@@ -227,6 +239,7 @@
// 鏂板鍥剧墖
async afterRead(event) {
var that = this
+ uni.showLoading({ title: '涓婁紶涓�...', mask: true })
uni.uploadFile({
url: that.$baseUrl + '/web/public/upload',
filePath: event.file.url,
@@ -235,6 +248,7 @@
folder: "WORKORDER_FILE_PATH"
},
success: (res) => {
+ uni.hideLoading();
let obj = JSON.parse(res.data)
if (obj.code === 200) {
obj.data.fileurl = obj.data.imgaddr
diff --git a/h5/pages/type_dca/type_dca.vue b/h5/pages/type_dca/type_dca.vue
index 98ee0a8..66c91dd 100644
--- a/h5/pages/type_dca/type_dca.vue
+++ b/h5/pages/type_dca/type_dca.vue
@@ -25,7 +25,8 @@
: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>
@@ -48,7 +49,7 @@
<view class="list_row_img" v-if="child.status === 2">
<view class="list_row_img_label">鍥剧墖</view>
<view class="list_row_img_list" v-if="child.imgList">
- <view class="list_row_img_list_row" v-for="(imgRow, n) in child.imgList.split(',')" :key="n">
+ <view class="list_row_img_list_row" v-for="(imgRow, n) in child.imgList.split(',')" :key="n" @click="previewImage(base + imgRow, child.imgList.split(',').map(item => base + item))">
<image :src="base + imgRow" mode="widthFix"></image>
</view>
<view class="list_row_img_list_zw"></view>
@@ -60,7 +61,7 @@
</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>
@@ -100,6 +101,12 @@
this.base = res.data.path
})
},
+ previewImage(current, urls) {
+ uni.previewImage({
+ current,
+ urls
+ });
+ },
submit() {
// 鎬绘暟
let tatal = 0
@@ -110,9 +117,16 @@
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'
})
}
@@ -136,7 +150,7 @@
},
// 鑾峰彇棰樼洰
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)
@@ -162,22 +176,45 @@
// 涓婁紶鍥剧墖
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"
- },
- success: (res) => {
+ folder: "WORKORDER_FILE_PATH",
+ },
+ 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()
+ // }
+ // }
+ // });
},
}
}
diff --git a/h5/pages/workOrder/workOrder.vue b/h5/pages/workOrder/workOrder.vue
index f511bc1..d89a3cb 100644
--- a/h5/pages/workOrder/workOrder.vue
+++ b/h5/pages/workOrder/workOrder.vue
@@ -23,16 +23,21 @@
<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>
@@ -115,9 +120,20 @@
};
},
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()
@@ -134,7 +150,7 @@
this.$refs.pengTree._hide()
},
// 浣嶇疆
- selectAddress(e) {
+ selectAddress1(e) {
this.localtionId = e[0].id
this.locationName = e[0].name
this.search.page = 1
@@ -164,7 +180,6 @@
page: this.search.page,
model: {
myWorkOrder: 1,
- memberId: this.userInfo.id,
type: this.typeId,
dealStatus: this.statusId,
localtionId: this.localtionId
@@ -232,7 +247,7 @@
if (type === 0) {
return 'SHE浜嬩欢涓婃姤'
} else if (type === 3) {
- return '璺岀粖婊戜簨浠�'
+ return '璺岀粖婊戜簨浠朵笂鎶�'
}
}
}
diff --git a/h5/pages/workOrder_dca/workOrder_dca.vue b/h5/pages/workOrder_dca/workOrder_dca.vue
index 485b5ae..abaa3f4 100644
--- a/h5/pages/workOrder_dca/workOrder_dca.vue
+++ b/h5/pages/workOrder_dca/workOrder_dca.vue
@@ -2,6 +2,7 @@
<view class="dca" v-if="info">
<view class="dca_head">
<text>浠诲姟{{returnStatus(info.status)}}</text>
+ <text>宸ュ崟鍙凤細{{info.code}}</text>
</view>
<u-gap height="5" bgColor="#EFEFEF"></u-gap>
<view class="dca_list">
@@ -16,7 +17,7 @@
<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>
@@ -32,7 +33,7 @@
<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)">
@@ -52,8 +53,8 @@
<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>
@@ -65,7 +66,7 @@
</view>
<view class="lc_item_content" v-else-if="item.objType === 4">
<view class="lc_item_content_item">
- <view class="lc_item_content_item_label">宸插偓淇冿細</view>
+ <!-- <view class="lc_item_content_item_label">宸插偓淇冿細</view> -->
<view class="lc_item_content_item_val">
<text>{{item.content}}</text>
</view>
@@ -104,6 +105,7 @@
@afterRead="afterRead"
@delete="deletePic"
name="2"
+ multiple
style="margin-top: 15rpx;" />
</u-form-item>
</u--form>
@@ -129,6 +131,7 @@
@afterRead="afterRead"
@delete="deletePic"
name="1"
+ multiple
style="margin-top: 15rpx;" />
</u-form-item>
</u--form>
@@ -183,6 +186,21 @@
this.getDetails()
},
methods: {
+ // 宸ュ崟鍌績
+ async urge() {
+ let res = await this.$u.api.urge({ workorderId: this.info.id })
+ if (res.code === 200) {
+ uni.showToast({ title: '鍌績鎴愬姛', icon: 'none' })
+ this.getDetails()
+ this.show2 = false
+ }
+ },
+ previewImage(current, urls) {
+ uni.previewImage({
+ current,
+ urls
+ });
+ },
closeGB() {
this.canScroll()
this.show1 = false
@@ -209,8 +227,8 @@
}).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(',')
}
})
},
@@ -222,11 +240,13 @@
info: that.model.info,
passOnUserId: that.model.passOnUserId,
multifileList: that.model.multifileList,
- workorderId: that.info.id
+ workorderId: that.info.id,
+ passOnType: this.info.status
})
if (res.code === 200) {
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
that.canScroll()
+ uni.$emit('update')
that.show = false
that.getDetails()
}
@@ -251,6 +271,7 @@
workorderId: that.info.id
})
if (res.code === 200) {
+ uni.$emit('update')
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
that.canScroll()
that.show1 = false
@@ -277,21 +298,43 @@
},
// 鏂板鍥剧墖
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"
- },
- success: (res) => {
+ folder: "WORKORDER_LOG_FILE_PATH",
+ },
+ 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)
+ // }
+ // }
+ // });
}
}
}
diff --git a/h5/pages/workOrder_she/workOrder_she.vue b/h5/pages/workOrder_she/workOrder_she.vue
index 73086fc..1083ca0 100644
--- a/h5/pages/workOrder_she/workOrder_she.vue
+++ b/h5/pages/workOrder_she/workOrder_she.vue
@@ -37,7 +37,7 @@
<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>
@@ -53,7 +53,7 @@
<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)">
@@ -73,8 +73,8 @@
<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>
@@ -86,7 +86,7 @@
</view>
<view class="lc_item_content" v-else-if="item.objType === 4">
<view class="lc_item_content_item">
- <view class="lc_item_content_item_label">宸插偓淇冿細</view>
+ <!-- <view class="lc_item_content_item_label">宸插偓淇冿細</view> -->
<view class="lc_item_content_item_val">
<text>{{item.content}}</text>
</view>
@@ -125,6 +125,7 @@
@afterRead="afterRead"
@delete="deletePic"
name="2"
+ multiple
style="margin-top: 15rpx;" />
</u-form-item>
</u--form>
@@ -150,6 +151,7 @@
@afterRead="afterRead"
@delete="deletePic"
name="1"
+ multiple
style="margin-top: 15rpx;" />
</u-form-item>
</u--form>
@@ -207,6 +209,12 @@
this.getDetails()
},
methods: {
+ previewImage(current, urls) {
+ uni.previewImage({
+ current,
+ urls
+ });
+ },
openGB() {
this.stopScroll()
this.show1 = true
@@ -257,7 +265,8 @@
info: that.model.info,
passOnUserId: that.model.passOnUserId,
multifileList: that.model.multifileList,
- workorderId: that.info.id
+ workorderId: that.info.id,
+ passOnType: this.info.status
})
if (res.code === 200) {
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
@@ -273,10 +282,7 @@
async urge() {
let res = await this.$u.api.urge({ workorderId: this.info.id })
if (res.code === 200) {
- uni.showToast({
- title: '鎿嶄綔鎴愬姛',
- icon: 'none'
- })
+ uni.showToast({ title: '鍌績鎴愬姛', icon: 'none' })
this.getDetails()
this.show2 = false
}
@@ -320,21 +326,43 @@
},
// 鏂板鍥剧墖
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"
- },
- success: (res) => {
+ folder: "WORKORDER_LOG_FILE_PATH",
+ },
+ 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)
+ // }
+ // }
+ // });
}
}
}
diff --git a/h5/uni_modules/peng-tree/peng-tree/style.css b/h5/uni_modules/peng-tree/peng-tree/style.css
index cd927e3..517457b 100644
--- a/h5/uni_modules/peng-tree/peng-tree/style.css
+++ b/h5/uni_modules/peng-tree/peng-tree/style.css
@@ -20,7 +20,7 @@
right: 0rpx;
bottom: 0rpx;
left: 0rpx;
- z-index: 9999;
+ z-index: 999999;
top: 360rpx;
transition: all 0.3s ease;
transform: translateY(100%);
diff --git a/h5/utils/http.api.js b/h5/utils/http.api.js
index b67fc37..12132e5 100644
--- a/h5/utils/http.api.js
+++ b/h5/utils/http.api.js
@@ -10,6 +10,7 @@
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); // 鎵归噺涓婁紶鏂囦欢鍒癋TP
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 }); // 鑾峰彇鍒嗙被绫诲埆鑾峰彇鍒嗙被鍒楄〃
@@ -20,6 +21,8 @@
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,
@@ -35,7 +38,10 @@
closeWorkOrder,
urge,
sendCopy,
- getQwSignature
+ getQwSignature,
+ uploadBatch,
+ getCategoryVOForGCXTree,
+ getCopySendUserPage
};
}
diff --git a/h5/utils/http.interceptor.js b/h5/utils/http.interceptor.js
index d109c15..ee462f4 100644
--- a/h5/utils/http.interceptor.js
+++ b/h5/utils/http.interceptor.js
@@ -26,35 +26,21 @@
uni.$u.http.interceptors.response.use((response) => {
uni.hideLoading();
// 鐧诲綍杩囨湡
- if (response.data.code === 401) {
- if (!isRefreshing) { // 鏄惁宸茬粡鎵ц鍒锋柊
- isRefreshing = true
- uni.login({
- provider: 'weixin',
- success: async function (loginRes) {
- let { code } = loginRes;
- uni.request({
- url: vm.$baseUrl + 'mobile/system/login',
- method: "GET",
- data: { code },
- success: (res) => {
- isRefreshing = false
- vm.$store.commit('setToken', res.data.data)
- // 宸茬粡鍒锋柊浜唗oken锛屽皢鎵�鏈夐槦鍒椾腑鐨勮姹傝繘琛岄噸璇�
- requests.forEach(item => item(res.data.data))
- requests = []
- }
- });
- }
- });
- }
- return new Promise((resolve) => {
- // 灏唕esolve鏀捐繘闃熷垪锛岀敤涓�涓嚱鏁板舰寮忔潵淇濆瓨锛岀瓑token鍒锋柊鍚庣洿鎺ユ墽琛�
- requests.push(token => {
- response.config.header['eva-auth-token'] = token
- resolve(uni.$u.http.request(response.config));
- })
+ if (response.data.code === 5112) {
+ uni.showToast({
+ title: '鐧诲綍杩囨湡锛屾鍦ㄩ噸鏂拌烦杞巿鏉�',
+ duration: 2000,
+ success() {
+ setTimeout(() => {
+ 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;
+ }, 1500)
+ }
})
+ return
}
if (response.data.code !== 200) {
uni.showToast({
--
Gitblit v1.9.3