Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const {chalkTag, findPages, fs, fsExtra} = require("./tools");
|
const {chalkTag, findPages, fs, fsExtra} = require("./tools");
|
||||||
const axios = require("axios");
|
const axios = require("axios");
|
||||||
let apps = {list: [], desc: "用于产品库主页面获取应用使用"}
|
let apps = {list: [], desc: "用于产品库主页面获取应用使用", type: 'wxwork'}
|
||||||
const getFileInfo = (app, file) => {
|
const getFileInfo = (app, file) => {
|
||||||
let vue = fs.readFileSync(file).toString()
|
let vue = fs.readFileSync(file).toString()
|
||||||
if (/appName/.test(vue)) {
|
if (/appName/.test(vue)) {
|
||||||
@@ -11,7 +11,7 @@ const getFileInfo = (app, file) => {
|
|||||||
} else
|
} else
|
||||||
app.style = {navigationBarTitleText: app.label}
|
app.style = {navigationBarTitleText: app.label}
|
||||||
}
|
}
|
||||||
if (/^App/.test(app.name)) {
|
if (/^App/.test(app.name) && app.label) {
|
||||||
let {name, label} = app,
|
let {name, label} = app,
|
||||||
path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`)
|
path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`)
|
||||||
apps.list.push({
|
apps.list.push({
|
||||||
@@ -27,7 +27,7 @@ const getFileInfo = (app, file) => {
|
|||||||
const saveApps = app => {
|
const saveApps = app => {
|
||||||
if (app.list.length > 0) {
|
if (app.list.length > 0) {
|
||||||
axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => {
|
axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => {
|
||||||
if (res.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
|
if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ instance.interceptors.request.use(config => {
|
|||||||
} else if (/AppCountryAlbum/.test(location.pathname) || config.module == 'AppCountryAlbum') {
|
} else if (/AppCountryAlbum/.test(location.pathname) || config.module == 'AppCountryAlbum') {
|
||||||
config.baseURL = '/aca'
|
config.baseURL = '/aca'
|
||||||
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
||||||
} else if (/\/project\/beta\//.test(location.pathname)) {
|
} else if (/\/project\/beta\//.test(location.pathname) || store.state.config.corpid == 'ww2a667717a70164f1' || config.module == 'wangge') {
|
||||||
config.baseURL = '/wangge'
|
config.baseURL = '/wangge'
|
||||||
} else if (/\/project\/police\//.test(location.pathname) || config.module == 'hnjc') {
|
} else if (/\/project\/police\//.test(location.pathname) || config.module == 'hnjc') {
|
||||||
config.baseURL = '/hnjc'
|
config.baseURL = '/hnjc'
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ export default {
|
|||||||
nodeKey: {default: "idNumber"},
|
nodeKey: {default: "idNumber"},
|
||||||
selected: {default: () => []},
|
selected: {default: () => []},
|
||||||
placeholder: {default: "选择人员"},
|
placeholder: {default: "选择人员"},
|
||||||
ops: {default: () => ({})}
|
ops: {default: () => ({})},
|
||||||
|
valueObj: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -46,13 +47,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleJump() {
|
handleJump() {
|
||||||
let {config, nodeKey} = this,
|
let {config, nodeKey, valueObj} = this,
|
||||||
selected = this.value || this.selected?.map(e => e[nodeKey])
|
selected = (valueObj ? this.value[nodeKey] : this.value) || this.selected?.map(e => e[nodeKey])
|
||||||
uni.$once('pagePicker:' + this.type, data => {
|
uni.$once('pagePicker:' + this.type, data => {
|
||||||
console.log('发送', data)
|
console.log('发送', data)
|
||||||
this.$emit("update:selected", data)
|
this.$emit("update:selected", data)
|
||||||
this.$emit("select", data)
|
this.$emit("select", data)
|
||||||
this.$emit("change", data ? [data].flat()?.map(e => e[nodeKey]) : "")
|
this.$emit("change", valueObj ? data : data ? [data].flat()?.map(e => e[nodeKey]) : "")
|
||||||
})
|
})
|
||||||
let url = `${config.url}`,
|
let url = `${config.url}`,
|
||||||
qsstr = qs.stringify({
|
qsstr = qs.stringify({
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ export default {
|
|||||||
return decodeURIComponent(this.$route.query.back) || ""
|
return decodeURIComponent(this.$route.query.back) || ""
|
||||||
},
|
},
|
||||||
currentApp() {
|
currentApp() {
|
||||||
return this.apps.find(e => this.target.indexOf(e.libPath) > -1) || {}
|
let path = this.target.replace(/(.+)[\\\/][^\\\/]+\??.*/, '$1')
|
||||||
|
return this.apps.find(e => e.libPath.indexOf(path) > -1) || {}
|
||||||
},
|
},
|
||||||
appPath() {
|
appPath() {
|
||||||
return this.currentApp?.label || ""
|
return this.currentApp?.label || ""
|
||||||
@@ -50,12 +51,15 @@ export default {
|
|||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate(v => {
|
this.$refs.loginForm.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
let {name: module,libPath} = this.currentApp
|
let {name: module, libPath} = this.currentApp,
|
||||||
if(/\/project\/police\//.test(libPath)){
|
corpId = 'ww596787bb70f08288'
|
||||||
|
if (/\/project\/police\//.test(libPath)) {
|
||||||
module = 'hnjc'
|
module = 'hnjc'
|
||||||
|
} else if (/\/project\/beta\//.test(libPath)) {
|
||||||
|
corpId = 'ww2a667717a70164f1'
|
||||||
|
module = 'wangge'
|
||||||
}
|
}
|
||||||
this.getToken({...this.form, module, corpId: 'ww596787bb70f08288'}).then(() => {
|
this.getToken({...this.form, module, corpId}).then(() => {
|
||||||
// this.getToken({...this.form, module, corpId: 'wpytYEDgAAcpXjmlYkYwKO60JDGDWrXg'}).then(() => {
|
|
||||||
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
|
this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({})
|
||||||
}).catch(() => 0)
|
}).catch(() => 0)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</AiPagePicker>
|
</AiPagePicker>
|
||||||
</AiItem>
|
</AiItem>
|
||||||
</AiGroup>
|
</AiGroup>
|
||||||
<div class="footer" @click="confirm">{{ fromType == 'add' ? '确认添加' : '确认修改' }}</div>
|
<div class="footer" @click="$u.debounce(confirm)">{{ fromType == 'add' ? '确认添加' : '确认修改' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -34,7 +34,6 @@ export default {
|
|||||||
girdMemberManageList: [],
|
girdMemberManageList: [],
|
||||||
girdMemberList: []
|
girdMemberList: []
|
||||||
},
|
},
|
||||||
detailInfo: {},
|
|
||||||
fromType: 'add', //add新增 edit编辑,
|
fromType: 'add', //add新增 edit编辑,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -54,13 +53,14 @@ export default {
|
|||||||
getDetail() {
|
getDetail() {
|
||||||
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${this.id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.detailInfo = res.data
|
|
||||||
if (this.fromType == 'edit') {
|
if (this.fromType == 'edit') {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
|
this.form.girdMemberList.map(e => e.id = e.wxUserId)
|
||||||
|
this.form.girdMemberManageList.map(e => e.id = e.wxUserId)
|
||||||
}
|
}
|
||||||
if (this.fromType == 'add') {
|
if (this.fromType == 'add') {
|
||||||
this.form.parentGirdId = this.detailInfo.id
|
this.form.parentGirdId = res.data.id
|
||||||
this.form.parentGirdName = this.detailInfo.girdName
|
this.form.parentGirdName = res.data.girdName
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,6 @@ export default {
|
|||||||
name: item.name
|
name: item.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.showLoading({mask: true})
|
|
||||||
this.$http.post(`/app/appgirdinfo/addOrUpdateByEw`, {...this.form, girdMemberManageList, girdMemberList}).then((res) => {
|
this.$http.post(`/app/appgirdinfo/addOrUpdateByEw`, {...this.form, girdMemberManageList, girdMemberList}).then((res) => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$u.toast('提交成功')
|
this.$u.toast('提交成功')
|
||||||
@@ -97,8 +96,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.$u.toast(err)
|
this.$u.toast(err)
|
||||||
}).finally(() => uni.hideLoading())
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
getArrayLabel(arr, key = 'name', separation = ',') {
|
getArrayLabel(arr, key = 'name', separation = ',') {
|
||||||
return arr?.map(e => e[key])?.join(separation)
|
return arr?.map(e => e[key])?.join(separation)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AddGird">
|
<section class="AddGird">
|
||||||
<div class="item-flex">
|
<div class="item-flex">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="tips">*</span>姓名
|
<span class="tips">*</span>姓名
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="name" maxlength="50" />
|
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="name" maxlength="50"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-flex">
|
<div class="item-flex">
|
||||||
@@ -13,25 +13,26 @@
|
|||||||
<span class="tips">*</span>手机号
|
<span class="tips">*</span>手机号
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="phone" maxlength="50" />
|
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="phone" maxlength="50"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-flex">
|
<div class="item-flex">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="tips">*</span>所属网格
|
<span class="tips">*</span>所属网格
|
||||||
</div>
|
</div>
|
||||||
<div class="value" @click="linkTo('./SelectGird?formType=2')">
|
<div class="value">
|
||||||
|
<AiPagePicker type="custom" v-model="selectGird" valueObj nodeKey="id" :ops="{url:'./SelectGird',label: 'girdName'}" formType="2">
|
||||||
<span v-if="selectGird.girdName">{{selectGird.girdName}}</span>
|
<AiMore v-model="selectGird.girdName"/>
|
||||||
<span style="color:#999;" v-else>请选择</span>
|
</AiPagePicker>
|
||||||
<img src="./components/img/right-icon.png" alt="" /></div>
|
</div>
|
||||||
|
<div class="footer" @click="confirm">确认添加</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer" @click="confirm">确认添加</div>
|
</section>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -42,25 +43,21 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
console.log(this.user)
|
|
||||||
this.name = this.user.name || ''
|
this.name = this.user.name || ''
|
||||||
this.phone = this.user.phone || ''
|
this.phone = this.user.phone || ''
|
||||||
uni.$on('goback', (res) => {
|
|
||||||
this.selectGird = res
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '网格员信息申报'
|
document.title = '网格员信息申报'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirm() {
|
confirm() {
|
||||||
if(!this.name){
|
if (!this.name) {
|
||||||
return this.$u.toast('请输入姓名')
|
return this.$u.toast('请输入姓名')
|
||||||
}
|
}
|
||||||
if(!this.phone){
|
if (!this.phone) {
|
||||||
return this.$u.toast('请输入手机号')
|
return this.$u.toast('请输入手机号')
|
||||||
}
|
}
|
||||||
if(!this.selectGird.girdName){
|
if (!this.selectGird.girdName) {
|
||||||
return this.$u.toast('请选择所属网格')
|
return this.$u.toast('请选择所属网格')
|
||||||
}
|
}
|
||||||
this.$http.post(`/app/appgirdmemberapply/girdMemberCheck?name=${this.name}&phone=${this.phone}&girdName=${this.selectGird.girdName}`).then((res) => {
|
this.$http.post(`/app/appgirdmemberapply/girdMemberCheck?name=${this.name}&phone=${this.phone}&girdName=${this.selectGird.girdName}`).then((res) => {
|
||||||
@@ -74,7 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
linkTo(url) {
|
linkTo(url) {
|
||||||
uni.navigateTo({ url })
|
uni.navigateTo({url})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,42 +79,48 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.AddGird {
|
.AddGird {
|
||||||
.item-flex{
|
.item-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 34px 32px;
|
padding: 34px 32px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
.label{
|
|
||||||
|
.label {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
.tips{
|
|
||||||
|
.tips {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
color: #F46;
|
color: #F46;
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.value{
|
|
||||||
|
.value {
|
||||||
width: calc(100% - 150px);
|
width: calc(100% - 150px);
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: #666;
|
color: #666;
|
||||||
img{
|
|
||||||
|
img {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.color-999{
|
|
||||||
|
.color-999 {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.footer{
|
|
||||||
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 112px;
|
height: 112px;
|
||||||
line-height: 112px;
|
line-height: 112px;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
<div class="success">
|
<div class="success">
|
||||||
<img src="./components/img/success.png" alt="" v-if="status">
|
<img src="./components/img/success.png" alt="" v-if="status">
|
||||||
<img src="./components/img/fail.png" alt="" v-else>
|
<img src="./components/img/fail.png" alt="" v-else>
|
||||||
<p>{{status == 1 ? '信息申报成功!' : '信息申报失败!'}}</p>
|
<p>{{ status == 1 ? '信息申报成功!' : '信息申报失败!' }}</p>
|
||||||
<p class="text">{{status == 1 ? '重新进入即可开始正常使用' : '系统无法匹配该申报信息,请联系管理人员进行处理'}}</p>
|
<p class="text">{{ status == 1 ? '重新进入即可开始正常使用' : '系统无法匹配该申报信息,请联系管理人员进行处理' }}</p>
|
||||||
<div class="footer" @click="back">{{status == 1 ? '确定' : '我知道了'}}</div>
|
<div class="footer" @click="back">{{ status == 1 ? '确定' : '我知道了' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -23,25 +23,32 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
back() {
|
back() {
|
||||||
uni.navigateBack({delta: 2})
|
uni.navigateBack({
|
||||||
|
delta: 2, success() {
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
uni-page-body{
|
uni-page-body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.success {
|
.success {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
img{
|
|
||||||
|
img {
|
||||||
width: 192px;
|
width: 192px;
|
||||||
height: 192px;
|
height: 192px;
|
||||||
margin: 96px 0 16px 0;
|
margin: 96px 0 16px 0;
|
||||||
}
|
}
|
||||||
p{
|
|
||||||
|
p {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
@@ -49,7 +56,8 @@ uni-page-body{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
.footer{
|
|
||||||
|
.footer {
|
||||||
width: calc(100% - 96px);
|
width: calc(100% - 96px);
|
||||||
height: 88px;
|
height: 88px;
|
||||||
line-height: 88px;
|
line-height: 88px;
|
||||||
@@ -63,7 +71,8 @@ uni-page-body{
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-left: 48px;
|
margin-left: 48px;
|
||||||
}
|
}
|
||||||
.text{
|
|
||||||
|
.text {
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<AiMore v-model="params.girdName" icon="arrow-down"/>
|
<AiMore v-model="params.girdName" icon="arrow-down"/>
|
||||||
</div>
|
</div>
|
||||||
</AiPagePicker>
|
</AiPagePicker>
|
||||||
<span @click="linkTo('./SetGird?id='+params.id)" v-if="isGridAdmin">网格配置</span>
|
<span @click="linkTo('./SetGird?id='+params.id)" v-if="isGridAdmin&&!!params.id">网格配置</span>
|
||||||
</div>
|
</div>
|
||||||
<component v-if="refresh" :is="component" @change="onChange" :params="params"/>
|
<component v-if="refresh" :is="component" @change="onChange" :params="params"/>
|
||||||
<div class="tabs" v-if="isTab">
|
<div class="tabs" v-if="isTab">
|
||||||
|
|||||||
@@ -23,20 +23,20 @@
|
|||||||
<div class="info-flex" v-for="(item, index) in form.girdMemberManageList" :key="index">
|
<div class="info-flex" v-for="(item, index) in form.girdMemberManageList" :key="index">
|
||||||
<span class="label">网格长</span>
|
<span class="label">网格长</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
{{ [item.name,item.phone].join(" ") }}
|
{{ [item.name, item.phone].join(" ") }}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="form.girdMemberList && form.girdMemberList.length">
|
<div v-if="form.girdMemberList && form.girdMemberList.length">
|
||||||
<div class="info-flex" v-for="(item, index) in form.girdMemberList" :key="index">
|
<div class="info-flex" v-for="(item, index) in form.girdMemberList" :key="index">
|
||||||
<span class="label">网格长</span>
|
<span class="label">网格员</span>
|
||||||
<span class="value">{{ item.name }} {{ item.phone }}
|
<span class="value">{{ item.name }} {{ item.phone }}
|
||||||
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon"
|
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon"
|
||||||
v-if="item.phone">
|
v-if="item.phone">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</div>
|
</div>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,43 +65,14 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.$dict.load('girdType')
|
this.$dict.load('girdType')
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
// this.getLeafNodes()
|
|
||||||
uni.$on('goback', e => {
|
|
||||||
this.getGridList(e.id, true)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = "网格管理"
|
document.title = "网格管理"
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toChoose () {
|
getGridList(id) {
|
||||||
uni.navigateTo({
|
|
||||||
url: './SelectGird?isFormMap=1'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getLeafNodes() {
|
|
||||||
this.$http.post(`/app/appgirdinfo/queryGirdMemberGirdsById`).then((res) => {
|
|
||||||
if (res?.data) {
|
|
||||||
this.treeList = res.data
|
|
||||||
|
|
||||||
const arr = res.data.filter(v => v.points).map(e => {
|
|
||||||
return {
|
|
||||||
id: e.id,
|
|
||||||
girdName: e.girdName,
|
|
||||||
points: e.points.map(p => [p.lng, p.lat])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
arr.length > 0 && this.renderGridMap(arr)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
getGridList (id) {
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$http.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${id}`).then((res) => {
|
||||||
this.$hideLoading()
|
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
const arr = res.data.map(v => {
|
const arr = res.data.map(v => {
|
||||||
return {
|
return {
|
||||||
@@ -112,12 +83,11 @@ export default {
|
|||||||
})
|
})
|
||||||
this.renderGridMap(arr)
|
this.renderGridMap(arr)
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).finally(() => {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getGridInfo(id, flag) {
|
||||||
getGridInfo (id, flag) {
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${id}`).then((res) => {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
@@ -142,7 +112,6 @@ export default {
|
|||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
renderGridMap(paths, count = 0) {
|
renderGridMap(paths, count = 0) {
|
||||||
let {map, lib: TMap, $refs: {AiTMap: {fitBounds}}} = this
|
let {map, lib: TMap, $refs: {AiTMap: {fitBounds}}} = this
|
||||||
if (TMap) {
|
if (TMap) {
|
||||||
@@ -157,58 +126,54 @@ export default {
|
|||||||
}
|
}
|
||||||
if (paths?.length > 0) {
|
if (paths?.length > 0) {
|
||||||
let bounds = []
|
let bounds = []
|
||||||
|
|
||||||
paths.forEach((path, i) => {
|
paths.forEach((path, i) => {
|
||||||
let color = colors[i % colors.length]
|
if(path.points?.length>0){
|
||||||
let polygon = new TMap.MultiPolygon({
|
let polygon = new TMap.MultiPolygon({
|
||||||
map, styles: {
|
map, styles: {
|
||||||
default: new TMap.PolygonStyle({
|
default: new TMap.PolygonStyle({
|
||||||
showBorder: true,
|
showBorder: true,
|
||||||
borderColor: '#5088FF',
|
borderColor: '#5088FF',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
color: this.$colorUtils.Hex2RGBA('#5088FF', 0.1)
|
color: this.$colorUtils.Hex2RGBA('#5088FF', 0.1)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
id: path.id,
|
id: path.id,
|
||||||
geometries: [{paths: path.points.map(e => new TMap.LatLng(e[1], e[0]))}]
|
geometries: [{paths: path.points.map(e => new TMap.LatLng(e[1], e[0]))}]
|
||||||
})
|
})
|
||||||
this.polygons.push(polygon)
|
this.polygons.push(polygon)
|
||||||
bounds.push(fitBounds(path.points.map(e => new TMap.LatLng(e[1], e[0]))))
|
bounds.push(fitBounds(path.points.map(e => new TMap.LatLng(e[1], e[0]))))
|
||||||
|
polygon.on('click', e => {
|
||||||
polygon.on('click', e => {
|
const id = e.target.id
|
||||||
const id = e.target.id
|
this.getGridInfo(id)
|
||||||
this.getGridInfo(id)
|
})
|
||||||
})
|
const points = path.points.map(e => new TMap.LatLng(e[1], e[0]))
|
||||||
|
const position = TMap.geometry.computeCentroid(points)
|
||||||
const points = path.points.map(e => new TMap.LatLng(e[1], e[0]))
|
let label = new TMap.MultiLabel({
|
||||||
|
id: `label~${path.id}`,
|
||||||
var position = TMap.geometry.computeCentroid(points)
|
data: path.id,
|
||||||
|
map: map,
|
||||||
let label = new TMap.MultiLabel({
|
styles: {
|
||||||
id: `label~${path.id}`,
|
building: new TMap.LabelStyle({
|
||||||
data: path.id,
|
color: '#3777FF',
|
||||||
map: map,
|
size: 20,
|
||||||
styles: {
|
alignment: 'center',
|
||||||
building: new TMap.LabelStyle({
|
verticalAlignment: 'middle'
|
||||||
color: '#3777FF',
|
})
|
||||||
size: 20,
|
},
|
||||||
alignment: 'center',
|
geometries: [
|
||||||
verticalAlignment: 'middle'
|
{
|
||||||
})
|
id: `label-class-${i}`,
|
||||||
},
|
styleId: 'building',
|
||||||
geometries: [
|
position,
|
||||||
{
|
content: path.girdName,
|
||||||
id: `label-class-${i}`,
|
}
|
||||||
styleId: 'building',
|
]
|
||||||
position: position,
|
})
|
||||||
content: path.girdName,
|
this.labels.push(label)
|
||||||
}
|
label.on('click', e => {
|
||||||
]
|
this.getGridInfo(e.target.id.split('~')[1])
|
||||||
})
|
});
|
||||||
this.labels.push(label)
|
}
|
||||||
label.on('click', e => {
|
|
||||||
this.getGridInfo(e.target.id.split('~')[1])
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
bounds = bounds.reduce((a, b) => {
|
bounds = bounds.reduce((a, b) => {
|
||||||
return fitBounds([
|
return fitBounds([
|
||||||
@@ -234,16 +199,9 @@ export default {
|
|||||||
callPhone(phone) {
|
callPhone(phone) {
|
||||||
uni.makePhoneCall({phoneNumber: phone})
|
uni.makePhoneCall({phoneNumber: phone})
|
||||||
},
|
},
|
||||||
handleSelect(e) {
|
handleSelectGird(v) {
|
||||||
if (e?.points?.length > 0) {
|
this.form = v || {}
|
||||||
this.form = e
|
this.getGridList(v?.id, true)
|
||||||
const points = e.points.map(e => new TMap.LatLng(e.lat, e.lng))
|
|
||||||
var position = TMap.geometry.computeCentroid(points)
|
|
||||||
this.map.setCenter(position)
|
|
||||||
this.map.setZoom(18)
|
|
||||||
} else {
|
|
||||||
this.$u.toast("所选网格没有标绘!")
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="Organization">
|
<div class="Organization">
|
||||||
<div class="title">网格人员</div>
|
<div class="title">网格人员</div>
|
||||||
<div class="user-content" v-for="(item, index) in dataInfo.parentGirdMembers" :key="index">
|
<div class="user-content" v-for="(item, index) in dataInfo.parentGirdMembers" :key="item.id">
|
||||||
<div>
|
<div>
|
||||||
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
|
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
|
||||||
<img :src="item.photo" alt="" v-if="item.photo">
|
<img :src="item.photo" alt="" v-if="item.photo">
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<p>{{ item.girdName }}</p>
|
<p>{{ item.girdName }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-content user-item" v-for="(item, index) in dataInfo.girdMembers" :key="index" @click="viewUser(item.wxUserId)">
|
<div class="user-content user-item" v-for="(item, index) in dataInfo.girdMembers" :key="item.id" @click="viewUser(item.wxUserId)">
|
||||||
<div>
|
<div>
|
||||||
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
|
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
|
||||||
<img :src="item.photo" alt="" v-if="item.photo">
|
<img :src="item.photo" alt="" v-if="item.photo">
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<AiEmpty description="暂无数据" class="emptyWrap"
|
<AiEmpty description="暂无数据" class="emptyWrap"
|
||||||
v-if="dataInfo.parentGirdMembers && !dataInfo.parentGirdMembers.length && !dataInfo.girdMembers.length"></AiEmpty>
|
v-if="dataInfo.parentGirdMembers && !dataInfo.parentGirdMembers.length && !dataInfo.girdMembers.length"></AiEmpty>
|
||||||
<div class="pad-b112"></div>
|
<AiGap h="112"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -53,13 +53,16 @@ export default {
|
|||||||
},
|
},
|
||||||
isGridMember() {
|
isGridMember() {
|
||||||
return this.user.girdCheckType > 0
|
return this.user.girdCheckType > 0
|
||||||
}
|
},
|
||||||
|
//是否是网格员申报
|
||||||
|
isApply: v => v.$route.query.formType == 2,
|
||||||
|
selected: v => [v.$route.query.selected].flat()
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.isFormMap) {
|
if (option.isFormMap) {
|
||||||
this.isFormMap = option.isFormMap
|
this.isFormMap = option.isFormMap
|
||||||
}
|
}
|
||||||
this.isGridMember ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格长')
|
this.isGridMember || this.isApply ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格长')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getAllGrids() {
|
getAllGrids() {
|
||||||
@@ -67,6 +70,10 @@ export default {
|
|||||||
let {girdMemberId} = this.user,
|
let {girdMemberId} = this.user,
|
||||||
url = `/app/appgirdinfo/queryAppGirdInfoByGirdLevel`,
|
url = `/app/appgirdinfo/queryAppGirdInfoByGirdLevel`,
|
||||||
params = {girdMemberId}
|
params = {girdMemberId}
|
||||||
|
if (this.isApply) {
|
||||||
|
url = `/app/appgirdinfo/listByInfo`
|
||||||
|
params = {}
|
||||||
|
}
|
||||||
if (this.isMyGirds) {
|
if (this.isMyGirds) {
|
||||||
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`
|
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`
|
||||||
params = {}
|
params = {}
|
||||||
@@ -81,7 +88,7 @@ export default {
|
|||||||
},
|
},
|
||||||
treeInit(isClick) {
|
treeInit(isClick) {
|
||||||
let last = uni.getStorageSync("lastSelectedGrid")
|
let last = uni.getStorageSync("lastSelectedGrid")
|
||||||
if (!isClick && last) {
|
if (!isClick && last && !this.isApply) {
|
||||||
this.$http.post("/app/appgirdinfo/listFatherGirdInfo", null, {
|
this.$http.post("/app/appgirdinfo/listFatherGirdInfo", null, {
|
||||||
params: {girdId: last}
|
params: {girdId: last}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -92,7 +99,7 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds)
|
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds)
|
||||||
this.treeList.map((item) => item.isChecked = false)
|
this.treeList.map((item) => item.isChecked = this.selected.includes(item.id))
|
||||||
let obj = {girdName: '可选范围', id: ''}
|
let obj = {girdName: '可选范围', id: ''}
|
||||||
this.slectList.push(obj)
|
this.slectList.push(obj)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@
|
|||||||
<div class="rightes fill" flex>
|
<div class="rightes fill" flex>
|
||||||
<img src="./components/img/gird--select-icon.png" alt="" class="avatras"/>
|
<img src="./components/img/gird--select-icon.png" alt="" class="avatras"/>
|
||||||
<div class="applicationNames fill" @click="showGirdInfo(item)">{{ item.girdName }}</div>
|
<div class="applicationNames fill" @click="showGirdInfo(item)">{{ item.girdName }}</div>
|
||||||
<u-icon v-if="item.hasChildren" @click="itemClick(item)" name="arrow-right" color="#ddd"/>
|
<u-icon @click="itemClick(item)" name="arrow-right" color="#ddd"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else/>
|
<AiEmpty description="暂无数据" class="emptyWrap" v-else/>
|
||||||
</AiItem>
|
</AiItem>
|
||||||
</AiGroup>
|
</AiGroup>
|
||||||
<div class="subBtn" v-if="detail.girdRight==1">
|
<div class="subBtn" v-if="detail.girdRight==1" flex>
|
||||||
|
<div class="delete" @click="handleDelete">删除网格</div>
|
||||||
|
<div @click="edit">编辑网格</div>
|
||||||
<div @click="toAddGird">添加下级网格</div>
|
<div @click="toAddGird">添加下级网格</div>
|
||||||
<div @click="handleDelete">编辑网格</div>
|
|
||||||
<div class="delete" @click="toAddGird">删除网格</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -57,7 +57,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
itemClick(row) {
|
itemClick(row) {
|
||||||
uni.navigateTo({url: `./SetGird?id=${row.id}`})
|
uni.navigateTo({url: `./SetGird?id=${row.id}`})
|
||||||
},
|
},
|
||||||
@@ -74,11 +73,11 @@ export default {
|
|||||||
uni.navigateTo({url: `./AddGird?id=${this.detail.id}&fromType=edit`})
|
uni.navigateTo({url: `./AddGird?id=${this.detail.id}&fromType=edit`})
|
||||||
},
|
},
|
||||||
handleDelete() {
|
handleDelete() {
|
||||||
this.$confirm('删除网格后,会清除网格内网格员和责任家庭信息,如有下级网格,会同步删除下级网格所有数据', `您确认要删除该网格?`).then(() => {
|
this.$confirm('删除网格后,会清除网格内网格员的责任家庭信息,如有下级网格,会同步删除下级网格所有数据', `您确认要删除该网格?`).then(() => {
|
||||||
this.$http.post(`/app/appgirdinfo/delete?ids=${this.detail.id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/delete?ids=${this.detail.id}`).then((res) => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$u.toast('删除成功!')
|
this.$u.toast('删除成功!')
|
||||||
this.getDetail()
|
uni.navigateBack({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -156,6 +155,7 @@ export default {
|
|||||||
height: 118px;
|
height: 118px;
|
||||||
background: #f4f8fb;
|
background: #f4f8fb;
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
div {
|
div {
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
@@ -167,7 +167,6 @@ export default {
|
|||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-left: 22px;
|
margin-left: 22px;
|
||||||
float: right;
|
|
||||||
border: 2px #1365dd solid;
|
border: 2px #1365dd solid;
|
||||||
|
|
||||||
&.delete {
|
&.delete {
|
||||||
@@ -176,7 +175,7 @@ export default {
|
|||||||
border-color: #f46;
|
border-color: #f46;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-of-type {
|
&:last-of-type {
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<section class="gridMembers">
|
<section class="gridMembers">
|
||||||
<div class="title">{{ detail.girdName }}</div>
|
<div class="title">{{ detail.girdName }}</div>
|
||||||
<div flex v-for="(item, index) in list" :key="index" class="listItem">
|
<div flex v-for="(item, index) in list" :key="index" class="listItem">
|
||||||
<!-- <img class="avatar" :src="item.photo"/>-->
|
<!-- <img class="avatar" :src="item.photo"/>-->
|
||||||
<div class="fill">
|
<div class="fill">
|
||||||
<div class="memberName" v-text="item.name"/>
|
<div class="memberName" v-text="item.name"/>
|
||||||
<div flex>
|
<div flex>
|
||||||
@@ -12,9 +12,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div @click="gotoFamilyList(item)">责任家庭</div>
|
<div @click="gotoFamilyList(item)">责任家庭</div>
|
||||||
<!-- <div @click="handleTag(item)">标签设置</div>-->
|
<!-- <div @click="handleTag(item)">标签设置</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-if="!list.length"/>
|
||||||
<div class="btn" v-if="detail.girdRight == 1">
|
<div class="btn" v-if="detail.girdRight == 1">
|
||||||
<span class="del" @click="del" v-if="!!detail.parentGirdId">删除网格</span>
|
<span class="del" @click="del" v-if="!!detail.parentGirdId">删除网格</span>
|
||||||
<span class="edit" @click="edit">编辑网格</span>
|
<span class="edit" @click="edit">编辑网格</span>
|
||||||
|
|||||||
@@ -158,10 +158,7 @@ export default {
|
|||||||
box-shadow: 0 1px 0 0 #e4e5e6;
|
box-shadow: 0 1px 0 0 #e4e5e6;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
// word-break: break-all;
|
word-break: break-all;
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-div {
|
.empty-div {
|
||||||
@@ -219,6 +216,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.imgs {
|
.imgs {
|
||||||
|
flex-shrink: 0;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
<div class="item" v-else-if="item.type == 'gird'">
|
<div class="item" v-else-if="item.type == 'gird'">
|
||||||
<span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span>
|
<span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span>
|
||||||
<div class="value" flex>
|
<div class="value" flex>
|
||||||
<AiPagePicker type="custom" @select="v=>handleSelectGird(v,item)" self :ops="{url:'./SelectGird',label: 'girdName'}">
|
<AiPagePicker type="custom" @select="v=>handleSelectGird(v,item)" :ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
|
||||||
<AiMore v-model="formData[item.fieldDbName + '_name']" :placeholder="item.fieldTips"/>
|
<AiMore v-model="formData[item.fieldDbName + '_name']" :placeholder="item.fieldTips"/>
|
||||||
</AiPagePicker>
|
</AiPagePicker>
|
||||||
</div>
|
</div>
|
||||||
@@ -462,7 +462,7 @@ export default {
|
|||||||
return obj?.toString() || "-"
|
return obj?.toString() || "-"
|
||||||
},
|
},
|
||||||
handleSelectGird(gird, item) {
|
handleSelectGird(gird, item) {
|
||||||
let info = gird?.[0] || {}
|
let info = gird || {}
|
||||||
this.formData[item.fieldDbName] = [info.id, info.girdName].join("_")
|
this.formData[item.fieldDbName] = [info.id, info.girdName].join("_")
|
||||||
this.formData[item.fieldDbName + "_name"] = info.girdName
|
this.formData[item.fieldDbName + "_name"] = info.girdName
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
|||||||
@@ -48,7 +48,15 @@
|
|||||||
<div class="type-content">
|
<div class="type-content">
|
||||||
<div class="flex" v-if="form.contentType == 'image'">
|
<div class="flex" v-if="form.contentType == 'image'">
|
||||||
<p class="label" style="width:40px;">图片</p>
|
<p class="label" style="width:40px;">图片</p>
|
||||||
<AiUploader :def.sync="formData.imgList" :limit="1" action="/admin/file/add2"></AiUploader>
|
<AiUploader :def.sync="formData.fileList" :limit="1" @data="(v) => fileData = v"></AiUploader>
|
||||||
|
</div>
|
||||||
|
<div class="flex" v-if="form.contentType == 'video'">
|
||||||
|
<p class="label" style="width:40px;">视频</p>
|
||||||
|
<AiUploader type="video" :limit="1" placeholder="上传视频" :def.sync="formData.fileList" @data="(v) => fileData = v"></AiUploader>
|
||||||
|
</div>
|
||||||
|
<div class="flex" v-if="form.contentType == 'file'">
|
||||||
|
<p class="label" style="width:40px;">附件</p>
|
||||||
|
<AiUploader type="file" :limit="1" placeholder="上传附件" :def.sync="formData.fileList" @data="(v) => fileData = v"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="form.contentType == 'link'">
|
<div v-if="form.contentType == 'link'">
|
||||||
<div class="flex border-b">
|
<div class="flex border-b">
|
||||||
@@ -68,14 +76,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex" v-if="form.contentType == 'video'">
|
|
||||||
<p class="label" style="width:40px;">视频</p>
|
|
||||||
<AiUploader type="video" :limit="1" placeholder="上传视频" :def.sync="formData.fileList" action="/admin/file/add2"></AiUploader>
|
|
||||||
</div>
|
|
||||||
<div class="flex" v-if="form.contentType == 'file'">
|
|
||||||
<p class="label" style="width:40px;">附件</p>
|
|
||||||
<AiUploader type="file" :limit="1" placeholder="上传附件" :def.sync="formData.fileList" action="/admin/file/add2"></AiUploader>
|
|
||||||
</div>
|
|
||||||
<div v-if="form.contentType == 'miniapp'" class="flex-label">
|
<div v-if="form.contentType == 'miniapp'" class="flex-label">
|
||||||
<div class="flex border-b">
|
<div class="flex border-b">
|
||||||
<p class="label">小程序标题</p>
|
<p class="label">小程序标题</p>
|
||||||
@@ -150,7 +150,8 @@ export default {
|
|||||||
accessTitle: '',
|
accessTitle: '',
|
||||||
accessUrl: '',
|
accessUrl: '',
|
||||||
accessAppid: '',
|
accessAppid: '',
|
||||||
file: {}
|
file: {},
|
||||||
|
mediaId: ''
|
||||||
},
|
},
|
||||||
areaIdList: [],
|
areaIdList: [],
|
||||||
tagIdList: [],
|
tagIdList: [],
|
||||||
@@ -162,7 +163,8 @@ export default {
|
|||||||
hour: true,
|
hour: true,
|
||||||
minute: true,
|
minute: true,
|
||||||
second: true
|
second: true
|
||||||
}
|
},
|
||||||
|
fileData: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
@@ -196,7 +198,7 @@ export default {
|
|||||||
if(!this.form.content) {
|
if(!this.form.content) {
|
||||||
return this.$u.toast('请输入文本内容')
|
return this.$u.toast('请输入文本内容')
|
||||||
}
|
}
|
||||||
if(this.form.contentType == 'image' && !this.formData.imgList.length) {
|
if(this.form.contentType == 'image' && !this.formData.fileList.length) {
|
||||||
return this.$u.toast('请上传图片')
|
return this.$u.toast('请上传图片')
|
||||||
}
|
}
|
||||||
if(this.form.contentType == 'video' && !this.formData.fileList.length) {
|
if(this.form.contentType == 'video' && !this.formData.fileList.length) {
|
||||||
@@ -208,9 +210,7 @@ export default {
|
|||||||
if(this.formData.fileList.length) {
|
if(this.formData.fileList.length) {
|
||||||
this.formData.file = this.formData.fileList[0]
|
this.formData.file = this.formData.fileList[0]
|
||||||
this.formData.accessUrl = this.formData.fileList[0].url
|
this.formData.accessUrl = this.formData.fileList[0].url
|
||||||
}
|
this.formData.mediaId = this.fileData.media.mediaId
|
||||||
if(this.formData.imgList.length) {
|
|
||||||
this.formData.accessUrl = this.formData.imgList[0].url
|
|
||||||
}
|
}
|
||||||
var params = {
|
var params = {
|
||||||
...this.form,
|
...this.form,
|
||||||
|
|||||||
@@ -7,7 +7,10 @@
|
|||||||
|
|
||||||
<div class="areaHint">
|
<div class="areaHint">
|
||||||
<u-icon name="map-fill" color="#73ABFF"></u-icon>
|
<u-icon name="map-fill" color="#73ABFF"></u-icon>
|
||||||
<span>{{resident.currentAreaName}}{{resident.currentAddress || ''}}</span>
|
<span style="margin-left: 4px;">{{resident.currentAreaName}}
|
||||||
|
<span v-if="resident.currentAddressGroup">{{resident.currentAddressGroup}}组</span>
|
||||||
|
<span v-if="resident.currentAddressNo">{{resident.currentAddressNo}}户</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -121,9 +124,6 @@ export default {
|
|||||||
}
|
}
|
||||||
.areaHint {
|
.areaHint {
|
||||||
margin-top: 38px;
|
margin-top: 38px;
|
||||||
span {
|
|
||||||
margin-left: 14px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="label">现住详细地址</span>
|
<span class="label">现住详细地址</span>
|
||||||
<span class="value" v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</span>
|
<span class="value" v-if="data.resident && data.resident.currentAddressGroup">{{ data.resident.currentAddressGroup }}组{{ data.resident.currentAddressNo }}户</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
|
|||||||
@@ -76,88 +76,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
uni-page-body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.AppResidentFile {
|
.AppResidentFile {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.currentTabBar0 {
|
|
||||||
padding-bottom: 98px;
|
|
||||||
.peopleGroup,
|
|
||||||
.people {
|
|
||||||
.topcard {
|
|
||||||
position: relative;
|
|
||||||
background: url(http://respub.sinoecare.net/20211221/4-20211221095551.png) no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
height: 320px;
|
|
||||||
.cards {
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: absolute;
|
|
||||||
bottom: -35px;
|
|
||||||
width: 92%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: 0 32px;
|
|
||||||
height: 232px;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 8px;
|
|
||||||
z-index: 999;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
.items {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
span {
|
|
||||||
font-size: 30px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
.items1 {
|
|
||||||
font-size: 40px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #354fc7;
|
|
||||||
}
|
|
||||||
.items2 {
|
|
||||||
font-size: 40px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #868686;
|
|
||||||
}
|
|
||||||
.items3 {
|
|
||||||
font-size: 40px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #5fba95;
|
|
||||||
}
|
|
||||||
.items4 {
|
|
||||||
font-size: 40px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #f09535;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.echartes {
|
|
||||||
margin-top: 64px;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
height: 616px;
|
|
||||||
background: #fff;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.echartss {
|
|
||||||
margin: 0 32px;
|
|
||||||
height: 100%;
|
|
||||||
padding-top: 16px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.currentTabBar1 {
|
.currentTabBar1 {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-bottom: 98px;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
::v-deep .AiTopFixed {
|
::v-deep .AiTopFixed {
|
||||||
b.title {
|
b.title {
|
||||||
@@ -174,7 +97,7 @@ uni-page-body {
|
|||||||
|
|
||||||
::v-deep .mainPane {
|
::v-deep .mainPane {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0 32px 88px;
|
padding: 0 32px 0;
|
||||||
|
|
||||||
.AiCell {
|
.AiCell {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -232,110 +155,6 @@ uni-page-body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.currentTabBar2 {
|
|
||||||
padding-bottom: 98px;
|
|
||||||
::v-deep .AiTopFixed {
|
|
||||||
b.title {
|
|
||||||
color: #333;
|
|
||||||
font-size: 32px;
|
|
||||||
|
|
||||||
& > i {
|
|
||||||
color: #267fce;
|
|
||||||
font-style: normal;
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .mainPane {
|
|
||||||
background: #fff;
|
|
||||||
padding: 0 32px;
|
|
||||||
|
|
||||||
.AiCell {
|
|
||||||
align-items: center;
|
|
||||||
height: 230px;
|
|
||||||
justify-content: flex-start;
|
|
||||||
|
|
||||||
.content {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
height: 100%;
|
|
||||||
max-width: unset;
|
|
||||||
border-bottom: 1px solid rgba(221, 221, 221, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
height: 100%;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
b {
|
|
||||||
font-size: 36px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
justify-content: center;
|
|
||||||
background: #f3f4f7;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 0 16px;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333;
|
|
||||||
margin-left: 16px;
|
|
||||||
height: 56px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.groupName {
|
|
||||||
width: 100%;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.owner,
|
|
||||||
.trends {
|
|
||||||
margin-top: 8px;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.personCount {
|
|
||||||
flex-shrink: 0;
|
|
||||||
font-size: 30px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trends {
|
|
||||||
* + * {
|
|
||||||
margin-left: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
em {
|
|
||||||
font-style: normal;
|
|
||||||
color: #5fba95;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
color: #f09535;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.AiImage {
|
|
||||||
margin-right: 24px;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 112px;
|
|
||||||
height: 112px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 98px;
|
height: 98px;
|
||||||
|
|||||||
@@ -25,7 +25,10 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<AiCell title label="联络信息" />
|
<AiCell title label="联络信息" />
|
||||||
<AiCell label="联系方式">{{ resident.phone }}</AiCell>
|
<AiCell label="联系方式">{{ resident.phone }}</AiCell>
|
||||||
<AiCell label="现住址">{{ resident.currentAreaName + resident.currentAddress }}</AiCell>
|
<AiCell label="现住址">{{ resident.currentAreaName }}
|
||||||
|
<span v-if="resident.currentAddressGroup">{{resident.currentAddressGroup}}组</span>
|
||||||
|
<span v-if="resident.currentAddressNo">{{resident.currentAddressNo}}户</span>
|
||||||
|
</AiCell>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<AiCell title label="家庭信息" />
|
<AiCell title label="家庭信息" />
|
||||||
@@ -73,7 +76,7 @@ export default {
|
|||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
family() {
|
family() {
|
||||||
return this.top.detail?.residentInfo?.family?.map((e) => ({ ...e, householdRelation: e.householdRelation || '户主' }))
|
return this.top.detail?.residentInfo?.family?.map((e) => ({ ...e, householdRelation: e.householdRelation || '户主', idNumber : e.idNumber?.replace(/(\d{10}).+/g, '$1******')}))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
<AiCell class="half" top-label label="添加时间">{{ top.detail.createTime }}</AiCell>
|
<AiCell class="half" top-label label="添加时间">{{ top.detail.createTime }}</AiCell>
|
||||||
<AiCell class="half" top-label label="真实姓名">{{ top.detail.realName }}</AiCell>
|
<AiCell class="half" top-label label="真实姓名">{{ top.detail.realName }}</AiCell>
|
||||||
<AiCell class="half" top-label label="手机号码">{{ resident.phone || '-' }}</AiCell>
|
<AiCell class="half" top-label label="手机号码">{{ resident.phone || '-' }}</AiCell>
|
||||||
<AiCell class="half" top-label label="家庭积分">{{ resident.familyIntegral }}</AiCell>
|
|
||||||
<AiCell class="half" top-label label="个人积分">{{ resident.personalIntegral }}</AiCell>
|
|
||||||
</u-row>
|
</u-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ let agentSignURL = "", apiList = []
|
|||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
token: "",
|
token: "",
|
||||||
corpId: "",
|
|
||||||
openUser: {},
|
openUser: {},
|
||||||
user: {},
|
user: {},
|
||||||
config: {},
|
config: {},
|
||||||
@@ -65,7 +64,7 @@ const store = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
redirectCode(state, url = location.href) {
|
redirectCode(state, url = location.href) {
|
||||||
let REDIRECT_URI = encodeURIComponent(url),
|
let REDIRECT_URI = encodeURIComponent(url),
|
||||||
corpid = state.corpId
|
corpid = state.config.corpid
|
||||||
const redirectTo = cid => {
|
const redirectTo = cid => {
|
||||||
location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base#wechat_redirect'
|
location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base#wechat_redirect'
|
||||||
.replace(/CORPID/g, cid)
|
.replace(/CORPID/g, cid)
|
||||||
@@ -75,7 +74,7 @@ const store = new Vuex.Store({
|
|||||||
redirectTo(corpid)
|
redirectTo(corpid)
|
||||||
} else {
|
} else {
|
||||||
store.dispatch("agentSign").then(() => {
|
store.dispatch("agentSign").then(() => {
|
||||||
corpid = state.corpId
|
corpid = state.config.corpid
|
||||||
redirectTo(corpid)
|
redirectTo(corpid)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user