@@ -12,9 +12,35 @@ | |||||
<title></title> | <title></title> | ||||
<!--preload-links--> | <!--preload-links--> | ||||
<!--app-context--> | <!--app-context--> | ||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=a24126d522c5dedb7791207742b6360b"></script> | |||||
<script type="text/javascript"> | |||||
//初始化地图时,若center属性缺省,地图默认定位到用户所在城市的中心 | |||||
var map = new AMap.Map('container', { | |||||
resizeEnable: true | |||||
}); | |||||
AMap.plugin('AMap.Geolocation', function() { | |||||
var geolocation = new AMap.Geolocation({ | |||||
enableHighAccuracy: true,//是否使用高精度定位,默认:true | |||||
timeout: 10000, //超过10秒后停止定位,默认:5s | |||||
buttonPosition:'RB', //定位按钮的停靠位置 | |||||
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20) | |||||
zoomToAccuracy: true, //定位成功后是否自动调整地图视野到定位点 | |||||
}); | |||||
map.addControl(geolocation); | |||||
geolocation.getCurrentPosition(function(status,result){ | |||||
console.log(status,result); | |||||
if(status=='complete'){ | |||||
console.log("result",result); | |||||
window.localStorage.setItem('userLocation',result.position.lng+','+result.position.lat) | |||||
} | |||||
}); | |||||
}); | |||||
</script> | |||||
</head> | </head> | ||||
<body> | <body> | ||||
<div id="app"><!--app-html--></div> | <div id="app"><!--app-html--></div> | ||||
<div id="container"></div> | |||||
<script type="module" src="/src/main.ts"></script> | <script type="module" src="/src/main.ts"></script> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -18,15 +18,6 @@ function getLocationInfo() { | |||||
// console.log('纬度:' + res.latitude); | // console.log('纬度:' + res.latitude); | ||||
// console.log('经度:' + res.longitude); | // console.log('经度:' + res.longitude); | ||||
// }); | // }); | ||||
uni.request({ | |||||
url: 'https://www.cz88.net/api/cz88/ip/base?ip=', | |||||
success: (res) => { | |||||
console.log(res.data.data.locations); | |||||
let latitudObj = res.data.data.locations[0] | |||||
// this.text = 'request success'; | |||||
uni.setStorageSync('userLocation', latitudObj.latitude + ',' + latitudObj.longitude) | |||||
} | |||||
}) | |||||
// const myAmapFun = new amap.AMapWX({ | // const myAmapFun = new amap.AMapWX({ | ||||
// key: env.aMapKey | // key: env.aMapKey | ||||
// }); | // }); | ||||
@@ -31,7 +31,7 @@ import { | |||||
TimePicker, | TimePicker, | ||||
DatePicker, | DatePicker, | ||||
Form, | Form, | ||||
CheckboxGroup | |||||
CheckboxGroup, | |||||
} from 'vant'; | } from 'vant'; | ||||
import share from '@/utils/share.js' | import share from '@/utils/share.js' | ||||
@@ -1,8 +1,8 @@ | |||||
<template> | <template> | ||||
<view style="height: 100%"> | |||||
<view> | |||||
<custom-nav-bar position="fixed" color="black" left-text="新增关联企业" left-arrow /> | <custom-nav-bar position="fixed" color="black" left-text="新增关联企业" left-arrow /> | ||||
<scroll-view :scroll-y="true" :style="'height: ' + (windowHeight - 80 - 36 - 20) + 'px;'"> | |||||
<scroll-view :scroll-y="true" :style="'height: 470px;'"> | |||||
<view class="create-enterprise"> | <view class="create-enterprise"> | ||||
<view class="border"> | <view class="border"> | ||||
<view class="create-enterprise-title"> | <view class="create-enterprise-title"> | ||||
@@ -63,9 +63,7 @@ | |||||
}, | }, | ||||
async onLoad() { | async onLoad() { | ||||
const res = uni.getSystemInfoSync(); | const res = uni.getSystemInfoSync(); | ||||
this.setData({ | |||||
windowHeight: res.windowHeight | |||||
}); | |||||
this.windowHeight = res.windowHeight | |||||
}, | }, | ||||
async onShow() {}, | async onShow() {}, | ||||
methods: { | methods: { | ||||
@@ -84,24 +82,19 @@ | |||||
const { | const { | ||||
name | name | ||||
} = event.currentTarget.dataset; | } = event.currentTarget.dataset; | ||||
this.form[name] = value; | this.form[name] = value; | ||||
this.setData({ | |||||
...this.form, | |||||
[name]: this[name] | |||||
}); | |||||
this.form = {...this.form}, | |||||
this[name]= this[name] | |||||
const { | const { | ||||
enterpriseName, | enterpriseName, | ||||
identificationNumber, | identificationNumber, | ||||
legalName | legalName | ||||
} = this.form; | } = this.form; | ||||
if (enterpriseName !== '' && identificationNumber !== '' && legalName !== '') { | if (enterpriseName !== '' && identificationNumber !== '' && legalName !== '') { | ||||
this.setData({ | |||||
isForm: true | |||||
}); | |||||
this.isForm = true | |||||
} else { | } else { | ||||
this.setData({ | |||||
isForm: false | |||||
}); | |||||
this.isForm = false | |||||
} | } | ||||
}, | }, | ||||
@@ -1,5 +1,5 @@ | |||||
<template> | <template> | ||||
<view style="height: 100%"> | |||||
<view> | |||||
<custom-nav-bar position="fixed" color="black" left-text="诉求详情" left-arrow border /> | <custom-nav-bar position="fixed" color="black" left-text="诉求详情" left-arrow border /> | ||||
<view class="myAppeal"> | <view class="myAppeal"> | ||||
@@ -15,7 +15,7 @@ | |||||
:style="'background-color: ' + type.cssClass + ';'">{{ type.label }}</view> | :style="'background-color: ' + type.cssClass + ';'">{{ type.label }}</view> | ||||
</block> | </block> | ||||
<view> | <view> | ||||
<text class="myAppeal-conent-block">{{ toods.getDateTime(List.createTime, 2) }}</text> | |||||
<text class="myAppeal-conent-block">{{ getDateTime(List.createTime, 2) }}</text> | |||||
<block v-for="(state, index) in statusList" :key="index"> | <block v-for="(state, index) in statusList" :key="index"> | ||||
<text v-if="List.appealProcessStatus + '' === state.value" | <text v-if="List.appealProcessStatus + '' === state.value" | ||||
class="myAppeal-conent-bg myAppeal-conent-block" :style="'background-color: ' + state.cssClass + ';'"> | class="myAppeal-conent-bg myAppeal-conent-block" :style="'background-color: ' + state.cssClass + ';'"> | ||||
@@ -52,7 +52,7 @@ | |||||
</view> | </view> | ||||
<view class="myAppeal-bg-conent"> | <view class="myAppeal-bg-conent"> | ||||
<rich-text :nodes="List.appealReply || ''" /> | <rich-text :nodes="List.appealReply || ''" /> | ||||
<view class="myAppeal-conent-block mt-16">{{ toods.getDateTime(List.replyTime, 2) }}</view> | |||||
<view class="myAppeal-conent-block mt-16">{{ getDateTime(List.replyTime, 2) }}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</block> | </block> | ||||
@@ -66,6 +66,7 @@ | |||||
import * as enterprise from '@/api/enterprise'; | import * as enterprise from '@/api/enterprise'; | ||||
import * as publicApi from '@/api/publicApi'; | import * as publicApi from '@/api/publicApi'; | ||||
import * as peopleApi from '@/api/peopleApi'; | import * as peopleApi from '@/api/peopleApi'; | ||||
import utils from '@/utils/util.map' | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -80,7 +81,7 @@ | |||||
status: 'appeal_process_status', | status: 'appeal_process_status', | ||||
typeList: [], | typeList: [], | ||||
statusList: [], | statusList: [], | ||||
List: null, | |||||
List: {}, | |||||
state: { | state: { | ||||
value: '', | value: '', | ||||
@@ -91,14 +92,15 @@ | |||||
}, | }, | ||||
async onLoad(option) { | async onLoad(option) { | ||||
// TODO: key:是区分企业-我的诉求详情和民生-我的调解详情 key默认为 1:企业 | // TODO: key:是区分企业-我的诉求详情和民生-我的调解详情 key默认为 1:企业 | ||||
this.setData({ | |||||
option | |||||
}); | |||||
this.option = option | |||||
await this.getAppealApi(); | await this.getAppealApi(); | ||||
await this.getTypeList(); | await this.getTypeList(); | ||||
await this.getStateList(); | await this.getStateList(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
getDateTime(time){ | |||||
return utils.getDateTime(time) | |||||
}, | |||||
// 返回我的诉求 | // 返回我的诉求 | ||||
onClickLeft() { | onClickLeft() { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
@@ -112,9 +114,7 @@ | |||||
dictType: this.type | dictType: this.type | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
typeList: res.data.list | |||||
}); | |||||
this.typeList = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -124,9 +124,7 @@ | |||||
dictType: this.status | dictType: this.status | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
statusList: res.data.list | |||||
}); | |||||
this.statusList = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -147,9 +145,7 @@ | |||||
id: this.option.id | id: this.option.id | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
List: res.data | |||||
}); | |||||
this.List = res.data | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -1,5 +1,5 @@ | |||||
<template> | <template> | ||||
<view style="height: 100%"> | |||||
<view> | |||||
<custom-nav-bar position="fixed" color="black" left-text="发布诉求" left-arrow /> | <custom-nav-bar position="fixed" color="black" left-text="发布诉求" left-arrow /> | ||||
<view class="line"></view> | <view class="line"></view> | ||||
@@ -58,9 +58,9 @@ | |||||
<textarea class="textarea card-content" :value="form.appealContent" @input="headleInput" | <textarea class="textarea card-content" :value="form.appealContent" @input="headleInput" | ||||
data-name="appealContent" maxlength="200" placeholder="请输入诉求内容,文字不超过200字"></textarea> | data-name="appealContent" maxlength="200" placeholder="请输入诉求内容,文字不超过200字"></textarea> | ||||
<view class="mt-16"> | <view class="mt-16"> | ||||
<van-uploader :file-list="fileList" :deletable="true" @after-read="afterRead" max-count="9" | |||||
<van-uploader :file-list="fileList" :deletable="true" :after-read="afterRead" max-count="9" | |||||
@delete="imageDelete"> | @delete="imageDelete"> | ||||
<van-icon name="/packages/enterprise/image/camera.png" size="80px" /> | |||||
<van-icon name="/src/images/camera.png" size="80px" /> | |||||
</van-uploader> | </van-uploader> | ||||
<view class="mt-16 card-block">附件不超过9个,每个大小不超过1M</view> | <view class="mt-16 card-block">附件不超过9个,每个大小不超过1M</view> | ||||
</view> | </view> | ||||
@@ -161,15 +161,11 @@ | |||||
}, | }, | ||||
async onShow() { | async onShow() { | ||||
const userInfoCount = uni.getStorageSync('userInfoCount'); | const userInfoCount = uni.getStorageSync('userInfoCount'); | ||||
this.setData({ | |||||
userInfoCount | |||||
}); | |||||
this.userInfoCount =userInfoCount | |||||
this.getEnterpriseList(); | this.getEnterpriseList(); | ||||
this.getAppelaTypeList(); | this.getAppelaTypeList(); | ||||
const userInfoData = uni.getStorageSync('userInfoData'); | const userInfoData = uni.getStorageSync('userInfoData'); | ||||
this.setData({ | |||||
userId: userInfoData.userId | |||||
}); | |||||
this.userId = userInfoData.userId | |||||
}, | }, | ||||
methods: { | methods: { | ||||
// 获取企业列表 | // 获取企业列表 | ||||
@@ -178,9 +174,7 @@ | |||||
userId: this.userId | userId: this.userId | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
enterpriseList: res.data.list | |||||
}); | |||||
this.enterpriseList = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -190,9 +184,7 @@ | |||||
dictType: 'appeal_type' | dictType: 'appeal_type' | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
appealTypeList: res.data.list | |||||
}); | |||||
this.appealTypeList = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -222,12 +214,14 @@ | |||||
index | index | ||||
} = e.target.dataset; | } = e.target.dataset; | ||||
const Listname = e.target.dataset.list; | const Listname = e.target.dataset.list; | ||||
console.log(e) | |||||
const List = this[Listname]; | const List = this[Listname]; | ||||
name = `form.${name}`; | name = `form.${name}`; | ||||
this.setData({ | |||||
[index]: e.detail.value, | |||||
[name]: Listname === 'enterpriseList' ? List[e.detail.value].id : List[e.detail.value].value | |||||
}); | |||||
console.log(Listname) | |||||
this.form.appealType =List[e.detail.value].value | |||||
this[index] = e.detail.value | |||||
this[name] = Listname === 'enterpriseList' ? List[e.detail.value].id : List[e.detail.value].value | |||||
}, | }, | ||||
// 清楚对应的image图片 | // 清楚对应的image图片 | ||||
@@ -237,19 +231,18 @@ | |||||
} = event.detail; | } = event.detail; | ||||
const Image = this.fileList; | const Image = this.fileList; | ||||
Image.splice(index, 1); | Image.splice(index, 1); | ||||
this.setData({ | |||||
fileList: Image | |||||
}); | |||||
this.fileList = Image | |||||
}, | }, | ||||
// 上传图片 | // 上传图片 | ||||
async afterRead(event) { | async afterRead(event) { | ||||
console.log(event) | |||||
const { | const { | ||||
file | file | ||||
} = event.detail; | |||||
// const res = await app.globalData.upload({ | |||||
// file | |||||
// }); | |||||
} = event; | |||||
const res = await getApp().globalData.upload({ | |||||
file | |||||
}); | |||||
if (res.code !== 0) { | if (res.code !== 0) { | ||||
uni.showToast({ | uni.showToast({ | ||||
title: '上传图片失败', | title: '上传图片失败', | ||||
@@ -268,10 +261,8 @@ | |||||
url | url | ||||
}); | }); | ||||
appealEnclosure.push(url); | appealEnclosure.push(url); | ||||
this.setData({ | |||||
fileList, | |||||
appealEnclosure | |||||
}); | |||||
this.fileList = fileList, | |||||
this.appealEnclosure = appealEnclosure | |||||
}, | }, | ||||
// 输入框重新赋值 | // 输入框重新赋值 | ||||
@@ -283,35 +274,31 @@ | |||||
name | name | ||||
} = event.currentTarget.dataset; | } = event.currentTarget.dataset; | ||||
this.form[name] = value; | this.form[name] = value; | ||||
this.setData({ | |||||
...this.form, | |||||
[name]: this[name] | |||||
}); | |||||
this.form = { | |||||
...this.form | |||||
} | |||||
this[name] = this[name] | |||||
console.log(this.form); | console.log(this.form); | ||||
}, | }, | ||||
// 选择地址 | // 选择地址 | ||||
headleAdress() { | headleAdress() { | ||||
this.setData({ | |||||
form: { | |||||
this.form = | |||||
{ | |||||
...this.form, | ...this.form, | ||||
// appealCurrentLocation: app.globalData.config.locationInfo.name | // appealCurrentLocation: app.globalData.config.locationInfo.name | ||||
} | } | ||||
}); | |||||
}, | }, | ||||
// 获得企业详情 | // 获得企业详情 | ||||
async getEnterprise(id) { | async getEnterprise(id) { | ||||
const res = await enterprise.getEnterpriseApi(id); | const res = await enterprise.getEnterpriseApi(id); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
...this, | |||||
appealDetails: res.data, | |||||
form: { | |||||
this.appealDetails= res.data | |||||
this.form = { | |||||
...this.form, | ...this.form, | ||||
enterpriseId: res.data.id | enterpriseId: res.data.id | ||||
} | } | ||||
}); | |||||
} | } | ||||
}, | }, | ||||
@@ -18,7 +18,7 @@ | |||||
:style="'background-color: ' + type.cssClass + ';'">{{ type.label }}</view> | :style="'background-color: ' + type.cssClass + ';'">{{ type.label }}</view> | ||||
</block> | </block> | ||||
<view> | <view> | ||||
<text class="myAppeal-conent-block">{{ toods.getDateTime(item.createTime, 2) }}</text> | |||||
<text class="myAppeal-conent-block">{{ getDateTime(item.createTime, 2) }}</text> | |||||
<block v-for="(state, index1) in statusList" :key="index1"> | <block v-for="(state, index1) in statusList" :key="index1"> | ||||
<text v-if="item.appealProcessStatus + '' === state.value" | <text v-if="item.appealProcessStatus + '' === state.value" | ||||
class="myAppeal-conent-bg myAppeal-conent-block" :style="'background-color: ' + state.cssClass + ';'"> | class="myAppeal-conent-bg myAppeal-conent-block" :style="'background-color: ' + state.cssClass + ';'"> | ||||
@@ -50,7 +50,7 @@ | |||||
<image src="/static/images/ic-success.png" mode="aspectFill"></image> | <image src="/static/images/ic-success.png" mode="aspectFill"></image> | ||||
<text>{{ item.nickName }}</text> | <text>{{ item.nickName }}</text> | ||||
</view> | </view> | ||||
<view class="myAppeal-conent-block">{{ toods.getDateTime(item.replyTime, 2) }}</view> | |||||
<view class="myAppeal-conent-block">{{ getDateTime(item.replyTime, 2) }}</view> | |||||
</view> | </view> | ||||
<view class="myAppeal-bg-conent"> | <view class="myAppeal-bg-conent"> | ||||
<rich-text :nodes="item.appealReply"></rich-text> | <rich-text :nodes="item.appealReply"></rich-text> | ||||
@@ -62,15 +62,10 @@ | |||||
</scroll-view> | </scroll-view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
<!-- <script module="toods" lang="wxs" src="@/wxs/util.wxs"></script> --> | |||||
<script> | <script> | ||||
// const app = getApp(); | |||||
// const { | |||||
// enterprise, | |||||
// publicApi | |||||
// } = app.globalData.api; | |||||
import * as publicApi from '@/api/publicApi'; | import * as publicApi from '@/api/publicApi'; | ||||
import * as enterprise from '@/api/enterprise'; | import * as enterprise from '@/api/enterprise'; | ||||
import utils from '@/utils/util.map'; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -112,6 +107,9 @@ | |||||
await this.getStateList(); | await this.getStateList(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
getDateTime(time){ | |||||
return utils.getDateTime(time) | |||||
}, | |||||
// 详情页跳转 | // 详情页跳转 | ||||
details(event) { | details(event) { | ||||
const { | const { | ||||
@@ -1,5 +1,5 @@ | |||||
<template> | <template> | ||||
<view style="height: 100%"> | |||||
<view> | |||||
<custom-nav-bar position="fixed" color="black" left-text="关联企业" left-arrow /> | <custom-nav-bar position="fixed" color="black" left-text="关联企业" left-arrow /> | ||||
<view class="enterprise" v-if="List.length !== 0"> | <view class="enterprise" v-if="List.length !== 0"> | ||||
@@ -16,11 +16,14 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view slot="right" :data-item="item" :data-index="index" @tap="swipeCell" class="enterprise-right"> | |||||
<view class="enterprise-circle"> | |||||
<van-icon name="delete-o" size="28px" color="#fff" /> | |||||
<template #right> | |||||
<view :data-item="item" :data-index="index" @tap="swipeCell" class="enterprise-right"> | |||||
<view class="enterprise-circle"> | |||||
<van-icon name="delete-o" size="28px" color="#fff" /> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | |||||
</template> | |||||
</van-swipe-cell> | </van-swipe-cell> | ||||
</view> | </view> | ||||
@@ -48,7 +51,7 @@ | |||||
components: {}, | components: {}, | ||||
data() { | data() { | ||||
return { | return { | ||||
List: null | |||||
List: [] | |||||
}; | }; | ||||
}, | }, | ||||
async onLoad() { | async onLoad() { | ||||
@@ -85,9 +88,7 @@ | |||||
List | List | ||||
} = this; | } = this; | ||||
List.splice(index, 1); | List.splice(index, 1); | ||||
this.setData({ | |||||
List: List | |||||
}); | |||||
this.List = List | |||||
}, | }, | ||||
// 跳转-添加企业 | // 跳转-添加企业 | ||||
@@ -102,12 +103,10 @@ | |||||
const res = await enterprise.getEnterpriseListApi({ | const res = await enterprise.getEnterpriseListApi({ | ||||
pageNo: 1, | pageNo: 1, | ||||
pageSize: 15, | pageSize: 15, | ||||
userId: uni.getStorageSync('userInfoData').userId | |||||
userId: uni.getStorageSync('userInfoData').id | |||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this.setData({ | |||||
List: res.data.list | |||||
}); | |||||
this.List = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -93,9 +93,8 @@ | |||||
} = event.currentTarget.dataset; | } = event.currentTarget.dataset; | ||||
this.currentTab = item.id | this.currentTab = item.id | ||||
this.permas.pageNo = 1; | this.permas.pageNo = 1; | ||||
this.dataList = [] | |||||
this.permas = this.permas | this.permas = this.permas | ||||
this.dataList = item.id | |||||
this.dataList = [] | |||||
if (item.id === 1) { | if (item.id === 1) { | ||||
this.getIntegral(); | this.getIntegral(); | ||||
@@ -17,7 +17,7 @@ | |||||
<image class="guide-img" :src="item.photo"></image> | <image class="guide-img" :src="item.photo"></image> | ||||
<text class="guide-name">{{ item.name }}</text> | <text class="guide-name">{{ item.name }}</text> | ||||
<van-rate readonly icon="/src/images/void-icon2.png" :size="14" void-icon="/src/images/rate-icon.png" v-model="item.star" /> | |||||
<van-rate readonly icon="//images/void-icon2.png" :size="14" void-icon="@/images/rate-icon.png" v-model="item.star" /> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="rural-list flex" | <view class="rural-list flex" | ||||
@@ -51,7 +51,7 @@ | |||||
<textarea class="textarea-class" maxlength="500" @input="headleInput" data-name="content" placeholder="请输入内容" | <textarea class="textarea-class" maxlength="500" @input="headleInput" data-name="content" placeholder="请输入内容" | ||||
auto-height :value="form.content"></textarea> | auto-height :value="form.content"></textarea> | ||||
<view class="form-image"> | <view class="form-image"> | ||||
<van-uploader @after-read="afterRead" :file-list="fileList" :deletable="true" max-count="9" | |||||
<van-uploader :after-read="afterRead" :file-list="fileList" :deletable="true" max-count="9" | |||||
@delete="imageDelete"> | @delete="imageDelete"> | ||||
<image class="camera" src="/static/images/icon9.png"></image> | <image class="camera" src="/static/images/icon9.png"></image> | ||||
</van-uploader> | </van-uploader> | ||||
@@ -112,20 +112,14 @@ | |||||
<van-dialog :show="isDialog" closeOnClickOverlay @confirm="isDialog = false" | <van-dialog :show="isDialog" closeOnClickOverlay @confirm="isDialog = false" | ||||
message="群众点单是针对发展党员的程序流程基本要求、党的理论方针、支部周期性工作动态、党员志愿者帮扶及对上级支部的意见建议进行点单。不涉及以上点单类型的建议您拨打政务服务热线0354-7221890" /> | message="群众点单是针对发展党员的程序流程基本要求、党的理论方针、支部周期性工作动态、党员志愿者帮扶及对上级支部的意见建议进行点单。不涉及以上点单类型的建议您拨打政务服务热线0354-7221890" /> | ||||
<van-field | |||||
v-model="FiledVisible" | |||||
is-link | |||||
readonly | |||||
label="所在村/社区" | |||||
placeholder="请选择所在地区" | |||||
@click="isVisible = true" | |||||
/> | |||||
<van-popup v-model:show="isVisible" round position="bottom"> | <van-popup v-model:show="isVisible" round position="bottom"> | ||||
<van-cascader | <van-cascader | ||||
v-model="currentValue" | v-model="currentValue" | ||||
title="请选择所在地区" | title="请选择所在地区" | ||||
:options="optionData" | :options="optionData" | ||||
:field-names="defaultFieldNames" | :field-names="defaultFieldNames" | ||||
@finish="onCloseVisible" | |||||
@close="onCloseVisible" | @close="onCloseVisible" | ||||
@change="onChangeVisible" | @change="onChangeVisible" | ||||
/> | /> | ||||
@@ -137,7 +131,8 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
// const app = getApp(); | |||||
const app = getApp().globalData | |||||
console.log(app) | |||||
// const { | // const { | ||||
// publicApi, | // publicApi, | ||||
// peopleApi | // peopleApi | ||||
@@ -253,10 +248,8 @@ | |||||
async afterRead(event) { | async afterRead(event) { | ||||
const { | const { | ||||
file | file | ||||
} = event.detail; | |||||
// const res = await app.globalData.upload({ | |||||
// file | |||||
// }); | |||||
} = event; | |||||
const res = await getApp().globalData.upload({file}); | |||||
if (res.code !== 0) { | if (res.code !== 0) { | ||||
uni.showToast({ | uni.showToast({ | ||||
title: '上传图片失败', | title: '上传图片失败', | ||||
@@ -344,9 +337,9 @@ | |||||
icon: 'none' | icon: 'none' | ||||
}); | }); | ||||
// wx.redirectTo({ | |||||
// url: '/packages/people/pages/masses/masses', | |||||
// }); | |||||
wx.redirectTo({ | |||||
url: '/packages/people/pages/masses/masses', | |||||
}); | |||||
// 返回上一页 | // 返回上一页 | ||||
uni.navigateBack(); | uni.navigateBack(); | ||||
}, | }, | ||||
@@ -396,11 +389,8 @@ | |||||
}, | }, | ||||
onChangeVisible(e) { | onChangeVisible(e) { | ||||
const { | |||||
options = [], value = [] | |||||
} = e.detail; | |||||
this.currentTile = options[options.length - 1].name | |||||
this.currentValue = value[value.length - 1] | |||||
this.currentTile = e.selectedOptions[e.tabIndex].name | |||||
this.currentValue =e.value | |||||
} | } | ||||
} | } | ||||
}; | }; | ||||
@@ -87,14 +87,14 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="form-treaty"> | <view class="form-treaty"> | ||||
<van-checkbox label-disabled :value="checked" shape="square" use-icon-slot @change="onCheckbox"> | |||||
<image class="ic-check" slot="icon" | |||||
:src="checked ? '/static/images/ic-radio.png' : '/static/images/ic-radio1.png'" /> | |||||
<van-checkbox label-disabled checked-color="red" v-model="checked" shape="square" use-icon-slot @change="onCheckbox"> | |||||
<!-- <image class="ic-check" | |||||
:src="checked ? '/static/images/ic-radio1.png' : '/static/images/ic-radio.png'" /> --> | |||||
<view class="checbox-text flex"> | <view class="checbox-text flex"> | ||||
本人承诺以上信息真实有效 | |||||
<!-- <text>我已阅读《</text> | <!-- <text>我已阅读《</text> | ||||
<navigator class="jump-to">申请调解</navigator> | |||||
<navigator class="jump-to">申请党员帮办</navigator> | |||||
<text>》,承诺材料真实性</text> --> | <text>》,承诺材料真实性</text> --> | ||||
本人承诺以上信息真实有效 | |||||
</view> | </view> | ||||
</van-checkbox> | </van-checkbox> | ||||
</view> | </view> | ||||
@@ -104,20 +104,13 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<van-field | |||||
v-model="FiledVisible" | |||||
is-link | |||||
readonly | |||||
label="所在村/社区" | |||||
placeholder="请选择所在地区" | |||||
@click="isVisible = true" | |||||
/> | |||||
<van-popup v-model:show="isVisible" round position="bottom"> | <van-popup v-model:show="isVisible" round position="bottom"> | ||||
<van-cascader | <van-cascader | ||||
v-model="currentValue" | v-model="currentValue" | ||||
title="请选择所在地区" | title="请选择所在地区" | ||||
:options="optionData" | :options="optionData" | ||||
:field-names="defaultFieldNames" | :field-names="defaultFieldNames" | ||||
@finish="onCloseVisible" | |||||
@close="onCloseVisible" | @close="onCloseVisible" | ||||
@change="onChangeVisible" | @change="onChangeVisible" | ||||
/> | /> | ||||
@@ -187,7 +180,7 @@ | |||||
// 级联选择默认显示字段 | // 级联选择默认显示字段 | ||||
// 级连选择器数据 end | // 级连选择器数据 end | ||||
defaultFieldNames: { | defaultFieldNames: { | ||||
label: 'name', | |||||
text: 'name', | |||||
value: 'id', | value: 'id', | ||||
children: 'children' | children: 'children' | ||||
}, | }, | ||||
@@ -202,7 +195,6 @@ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
async onLoad(option) { | async onLoad(option) { | ||||
console.log(option); | |||||
this.option = option | this.option = option | ||||
this.getTypeList(); | this.getTypeList(); | ||||
this.deptTreeApi(); | this.deptTreeApi(); | ||||
@@ -257,11 +249,8 @@ | |||||
}, | }, | ||||
onChangeVisible(e) { | onChangeVisible(e) { | ||||
const { | |||||
options = [], value = [] | |||||
} = e.detail; | |||||
this.currentTile = options[options.length - 1].name | |||||
this.currentValue = value[value.length - 1] | |||||
this.currentTile = e.selectedOptions[e.tabIndex].name | |||||
this.currentValue =e.value | |||||
}, | }, | ||||
// 下拉选择事件 | // 下拉选择事件 | ||||
@@ -270,19 +259,23 @@ | |||||
name | name | ||||
} = e.currentTarget.dataset; | } = e.currentTarget.dataset; | ||||
let value = e.detail.value; | let value = e.detail.value; | ||||
let type = 'form.' + name; | |||||
let type = this.form.name; | |||||
let typename = '' | |||||
if (name === 'caseType') { | if (name === 'caseType') { | ||||
let typename = this.pickerList[0].typeList[value].value; | |||||
typename = this.pickerList[0].typeList[value].value; | |||||
console.log(typename) | |||||
} else { | } else { | ||||
let typename = this.pickerList[1].typeList[value].id; | |||||
typename = this.pickerList[1].typeList[value].id; | |||||
} | } | ||||
this.caseType = value | |||||
this.form.caseType = value | |||||
this[name] = value | this[name] = value | ||||
this[type] = typename | this[type] = typename | ||||
}, | }, | ||||
// 勾选协议 | // 勾选协议 | ||||
onCheckbox(event) { | onCheckbox(event) { | ||||
this.checked = event.detail | |||||
this.checked = event | |||||
}, | }, | ||||
// 上传图片 | // 上传图片 | ||||
@@ -317,7 +310,7 @@ | |||||
dictType: 'people_cases_type' | dictType: 'people_cases_type' | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this['pickerList[0].typeList'] = res.data.list | |||||
this.pickerList[0].typeList = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -327,7 +320,7 @@ | |||||
name: this.name | name: this.name | ||||
}); | }); | ||||
if (res.data) { | if (res.data) { | ||||
this['pickerList[0].typeList'] = res.data.list | |||||
this.pickerList[0].typeList = res.data.list | |||||
} | } | ||||
}, | }, | ||||
@@ -55,7 +55,7 @@ | |||||
<view class="section-item-left flex1 flex flex-between flex-col"> | <view class="section-item-left flex1 flex flex-between flex-col"> | ||||
<view class="consult-content-title text-line-1">{{ item.title }}</view> | <view class="consult-content-title text-line-1">{{ item.title }}</view> | ||||
<view class="consult-content-block"> | <view class="consult-content-block"> | ||||
<text>{{ getDateTime(item.createTime) }}</text> | |||||
<text>{{ getDateTime(item.createTime)}}</text> | |||||
<text class="ml-30">{{ item.publisher }}</text> | <text class="ml-30">{{ item.publisher }}</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -73,7 +73,7 @@ | |||||
<view class="section-item-left flex1 flex flex-between flex-col"> | <view class="section-item-left flex1 flex flex-between flex-col"> | ||||
<view class="consult-content-title text-line-3">{{ item.name || item.title }}</view> | <view class="consult-content-title text-line-3">{{ item.name || item.title }}</view> | ||||
<view class="consult-content-block"> | <view class="consult-content-block"> | ||||
{{ item.createTime }} | |||||
{{ getDateTime(item.createTime) }} | |||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -170,9 +170,10 @@ | |||||
updateQuery(url, name) { | updateQuery(url, name) { | ||||
return utils.updateQuery(url, name); | return utils.updateQuery(url, name); | ||||
}, | }, | ||||
getDateTime(tiem){ | |||||
console.log(time) | |||||
return utils.getDateTime(tiem) | |||||
getDateTime(time){ | |||||
if(typeof item !== undefined) { | |||||
return utils.getDateTime(time) | |||||
} | |||||
}, | }, | ||||
/** | /** | ||||
* 接口 | * 接口 | ||||
@@ -212,20 +213,20 @@ | |||||
}, | }, | ||||
async hospitalPageApi() { | async hospitalPageApi() { | ||||
const locationInfo = uni.getStorageSync('userLocation'); | |||||
if (!Object.keys(locationInfo).length) { | |||||
return uni.showToast({ | |||||
title: '未允许定位,当前页面功能无法完全体验', | |||||
icon: 'none', | |||||
duration: 1500 | |||||
}); | |||||
} | |||||
// const locationInfo = uni.getStorageSync('userLocation'); | |||||
// if (!Object.keys(locationInfo).length) { | |||||
// return uni.showToast({ | |||||
// title: '未允许定位,当前页面功能无法完全体验', | |||||
// icon: 'none', | |||||
// duration: 1500 | |||||
// }); | |||||
// } | |||||
const param = { | const param = { | ||||
pageNo: 1, | pageNo: 1, | ||||
pageSize: 10, | pageSize: 10, | ||||
nearFlag: this.nearFlag, | nearFlag: this.nearFlag, | ||||
posX: locationInfo.split[0], | |||||
posY: locationInfo.split[1] | |||||
// posX: locationInfo.split[0], | |||||
// posY: locationInfo.split[1] | |||||
}; | }; | ||||
if (this.searchValue) { | if (this.searchValue) { | ||||
param.name = this.searchValue; | param.name = this.searchValue; | ||||
@@ -99,6 +99,7 @@ | |||||
</view> | </view> | ||||
<van-empty v-if="dataList.length === 0" description="暂无数据" /> | <van-empty v-if="dataList.length === 0" description="暂无数据" /> | ||||
</view> | </view> | ||||
<view style="height:150rpx"></view> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
@@ -6,7 +6,7 @@ | |||||
:indicator-active-color="indicatorActiveColor"> | :indicator-active-color="indicatorActiveColor"> | ||||
<block v-for="(item, index) in imageList" :key="index"> | <block v-for="(item, index) in imageList" :key="index"> | ||||
<swiper-item> | <swiper-item> | ||||
<navigator v-if="item.clickUrl" class="line-navigator" :url="updateQuery(itemName.clickUrl,itemName)" hover-class="none"></navigator> | |||||
<navigator v-if="item.clickUrl" class="line-navigator" :url="updateQuery(item.clickUrl,itemName)" hover-class="none"></navigator> | |||||
<image class="custom-swiper-img" :src="item.pic"></image> | <image class="custom-swiper-img" :src="item.pic"></image> | ||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
@@ -64,7 +64,7 @@ | |||||
</view> | </view> | ||||
<view class="life-conent-rate flex flex-v-center flex-between"> | <view class="life-conent-rate flex flex-v-center flex-between"> | ||||
<view> | <view> | ||||
<text>距离</text> | |||||
<!-- <text>距离</text> --> | |||||
<!-- <text class="rate-loca-active">{{ util.setMorKm(item.distance) }}</text> --> | <!-- <text class="rate-loca-active">{{ util.setMorKm(item.distance) }}</text> --> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -82,6 +82,7 @@ | |||||
</van-tabs> --> | </van-tabs> --> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view style="height:150rpx"></view> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
@@ -1,9 +1,10 @@ | |||||
export default async function (params) { | export default async function (params) { | ||||
const app = getApp() | |||||
const app = getApp().globalData | |||||
uni.showLoading({ | uni.showLoading({ | ||||
mask: true | mask: true | ||||
}) | }) | ||||
const url = `${app.env.baseUrl}/admin-api/infra/file/upload` | const url = `${app.env.baseUrl}/admin-api/infra/file/upload` | ||||
const token = uni.getStorageSync('token') | const token = uni.getStorageSync('token') | ||||
const { | const { | ||||