APPbug反馈修改

This commit is contained in:
仲么了
2023-08-10 09:18:17 +08:00
parent 192bd44c7a
commit f395da8f93
48 changed files with 1420 additions and 480 deletions

View File

@@ -89,6 +89,7 @@
vertical="bottom"
:content="content"
@trigger="trigger"
v-if="content.length"
/>
<uni-popup ref="share" type="share" background-color="#fff">
<uni-popup-share title="分享到"></uni-popup-share>
@@ -116,7 +117,7 @@ export default {
text: '设备',
},
{
text: '用户',
text: '用户',
},
{
text: '拓扑图',
@@ -249,24 +250,33 @@ export default {
},
onLoad(option) {
let userInfo = uni.getStorageSync('userInfo')
this.content.push({
iconPath: '/static/share.png',
text: '编辑',
})
this.content.push({
iconPath: '/static/delate.png',
text: '删除',
})
this.content.push({
iconPath: '/static/transfer.png',
text: '移交',
})
this.content.push({
iconPath: '/static/share.png',
text: '分享',
})
if (userInfo.authorities == '3') {
} else if (userInfo.authorities == '4') {
// this.content.push({
// iconPath: '/static/share.png',
// text: '编辑',
// })
// this.content.push({
// iconPath: '/static/delate.png',
// text: '删除',
// })
// this.content.push({
// iconPath: '/static/transfer.png',
// text: '移交',
// })
// this.content.push({
// iconPath: '/static/share.png',
// text: '分享',
// })
if (userInfo.authorities == 'engineering_user' || userInfo.authorities == 'app_vip_user') {
this.content.push(
{
iconPath: '/static/share.png',
text: '编辑',
},
{
iconPath: '/static/delate.png',
text: '删除',
},
)
}
setTimeout(() => {
// 获取nav高度

View File

@@ -6,7 +6,7 @@
:fixed="true"
status-bar
left-icon="left"
:rightIcon="userInfo.authorities == '2' ? '' : 'plusempty'"
:rightIcon="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user' ? 'plusempty' : ''"
background-color="#fff"
color="#111"
title="项目管理"
@@ -44,6 +44,7 @@ export default {
},
methods: {
init() {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
this.store = this.DataSource('/cs-device-boot/project/queryProject')
this.store.params.engineeringId = uni.getStorageSync('engineering')?.id
this.store.reload()

View File

@@ -8,8 +8,8 @@
<uni-easyinput
v-model="formData.engineeringName"
placeholder="请输入项目名称"
@click.native="showDrawer"
:clearable="false"
disabled
/>
</uni-forms-item>
<uni-forms-item label="项目名称">
@@ -122,8 +122,8 @@ export default {
topoIds: [],
description: '',
name: '',
lat: '2',
lng: '3',
lat: '',
lng: '',
},
engineeringList: [],
tempList: [],
@@ -162,6 +162,10 @@ export default {
this.formData[key] = this.project[key]
}
}
} else {
let engineering = uni.getStorageSync(this.$cacheKey.engineering)
this.formData.engineeringId = engineering.id
this.formData.engineeringName = engineering.name
}
uni.getLocation({
type: 'wgs84',
@@ -229,7 +233,9 @@ export default {
chooseLocation() {
uni.chooseLocation({
success: function (res) {
this.address = res.name
this.formData.area = res.name
this.formData.lat = res.latitudeame
this.formData.lng = res.longitude
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
@@ -268,18 +274,24 @@ export default {
let data = JSON.parse(JSON.stringify(this.formData))
delete data.files
let res = {}
console.warn(data, arr)
if (this.project) {
data.id = this.project.id
res = await updateAppProject(data, arr)
} else {
res = await addAppProject(data, arr)
}
console.log(res)
if (res.length === 1) {
this.$util.toast(res[0].message)
return
let result = {}
if (res.code === 'A0000') {
result = res
} else {
console.warn(res)
if (res.length === 1) {
this.$util.toast(res[0].message)
return
}
result = JSON.parse(res[1].data)
}
let result = JSON.parse(res[1].data)
if (result.code === 'A0000') {
if (this.project) {
this.$util.toast('项目修改成功')