flat: 添加工作地址、添加审核回填等
This commit is contained in:
1
App.vue
1
App.vue
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function(options) {
|
onLaunch: function(options) {
|
||||||
|
this.$store.dispatch('InitArea')
|
||||||
if (options.query.token) {
|
if (options.query.token) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/blank?token=' + options.query.token
|
url: '/pages/login/blank?token=' + options.query.token
|
||||||
|
|||||||
@@ -101,6 +101,14 @@ export const addInviteCompanyAuth = (params) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getInviteCompanyAuthInfo = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/tenant/company/app/inviteCompany/authInfo',
|
||||||
|
method: 'get',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const getDictionary = (params) => {
|
export const getDictionary = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/jobslink-api/system/dict-biz/dictionary',
|
url: '/api/jobslink-api/system/dict-biz/dictionary',
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<image src="../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"
|
<image src="../../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"
|
||||||
mode=""></image>
|
mode=""></image>
|
||||||
<view style="font-size: 26rpx;color:#333;">{{ companyitem.jobAddress }}</view>
|
<view style="font-size: 26rpx;color:#333;">{{ companyitem.jobCompanyName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view v-if="near">
|
<!-- <view v-if="near">
|
||||||
{{ companyitem.distanceStr }}km
|
{{ companyitem.distanceStr }}km
|
||||||
|
|||||||
@@ -77,8 +77,8 @@
|
|||||||
break
|
break
|
||||||
case 9:
|
case 9:
|
||||||
this.navTo(
|
this.navTo(
|
||||||
'/pages/recruit/subPage/enterpriceCertification/enterpriceCertification'
|
'/pages/recruit/subPage/enterpriceCertification/enterpriceCertification?reviewStatus=9'
|
||||||
)
|
)
|
||||||
this.$api.sleep(1000).then(() => {
|
this.$api.sleep(1000).then(() => {
|
||||||
this.$api.msg('您的企业信息已被系统驳回,请重新上传')
|
this.$api.msg('您的企业信息已被系统驳回,请重新上传')
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -86,7 +86,8 @@
|
|||||||
import dic from '@/common/dic.js'
|
import dic from '@/common/dic.js'
|
||||||
import PickerList from './pickerList.vue';
|
import PickerList from './pickerList.vue';
|
||||||
import {
|
import {
|
||||||
addInviteCompanyAuth
|
addInviteCompanyAuth,
|
||||||
|
getInviteCompanyAuthInfo
|
||||||
} from '@/api/userrecruit.js'
|
} from '@/api/userrecruit.js'
|
||||||
import {
|
import {
|
||||||
mapState
|
mapState
|
||||||
@@ -195,6 +196,11 @@
|
|||||||
rules
|
rules
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
if (options.reviewStatus === '9') {
|
||||||
|
this.getInfo()
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
authInfo: (state) => state.auth.authInfo,
|
authInfo: (state) => state.auth.authInfo,
|
||||||
@@ -238,6 +244,20 @@
|
|||||||
_this.$api.msg('请完善内容')
|
_this.$api.msg('请完善内容')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async getInfo() {
|
||||||
|
let params = {
|
||||||
|
idNumber: this.authInfo.idNumber
|
||||||
|
}
|
||||||
|
let resData = await getInviteCompanyAuthInfo(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.formData = {
|
||||||
|
...resData.data.data,
|
||||||
|
nature: String(resData.data.data.nature),
|
||||||
|
cityId: String(resData.data.data.cityId),
|
||||||
|
tradeId: String(resData.data.data.tradeId),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
reset() {
|
reset() {
|
||||||
const _this = this
|
const _this = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|||||||
141
pages/recruit/subPage/enterpriceCertification/pickerTree.vue
Normal file
141
pages/recruit/subPage/enterpriceCertification/pickerTree.vue
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<view style="width: 100%">
|
||||||
|
<u--input :value="formatValue(value)" disabledColor="#ffffff" :placeholder="placeholder"
|
||||||
|
border="border"></u--input>
|
||||||
|
<u-picker ref="uPicker" :show="visibel" :keyName="labelName" :columns="VarColumns" @confirm="skillConfirm"
|
||||||
|
@cancel="skillClose" @close="skillClose" @change="changeHandler"></u-picker>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
isArray
|
||||||
|
} from 'lodash'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
valued: '',
|
||||||
|
VarColumnsIndex: [],
|
||||||
|
VarColumns: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
border: {
|
||||||
|
type: String,
|
||||||
|
default: 'none'
|
||||||
|
},
|
||||||
|
valueName: {
|
||||||
|
type: String,
|
||||||
|
default: 'value'
|
||||||
|
},
|
||||||
|
labelName: {
|
||||||
|
type: String,
|
||||||
|
default: 'label'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
visibel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
tree: {
|
||||||
|
type: Array,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
deep: {
|
||||||
|
type: Number,
|
||||||
|
require: 1
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
require: ''
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
type: Function
|
||||||
|
},
|
||||||
|
returnValue: {
|
||||||
|
type: String,
|
||||||
|
default: 'value',
|
||||||
|
},
|
||||||
|
joinSymbel: {
|
||||||
|
type: String,
|
||||||
|
default: '-',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.VarColumnsIndex = new Array(3).fill(this.deep)
|
||||||
|
const arr = []
|
||||||
|
this.changeHandler({
|
||||||
|
columnIndex: 0,
|
||||||
|
index: 0
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
skillClose() {
|
||||||
|
this.$emit("cancel");
|
||||||
|
},
|
||||||
|
skillConfirm({
|
||||||
|
index,
|
||||||
|
value,
|
||||||
|
values
|
||||||
|
}) {
|
||||||
|
if (this.returnValue === 'label') {
|
||||||
|
this.$emit("input", value.map(item => item[this.labelName]).join(this.joinSymbel));
|
||||||
|
} else {
|
||||||
|
this.$emit("input", value);
|
||||||
|
}
|
||||||
|
this.$emit("cancel");
|
||||||
|
},
|
||||||
|
changeHandler(e) {
|
||||||
|
const {
|
||||||
|
columnIndex,
|
||||||
|
value,
|
||||||
|
values, // values为当前变化列的数组内容
|
||||||
|
index,
|
||||||
|
} = e
|
||||||
|
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
||||||
|
const picker = this.$refs.uPicker
|
||||||
|
const columnlist = []
|
||||||
|
const arr = JSON.parse(JSON.stringify(this.VarColumnsIndex)).map((vItem, vIndex) => {
|
||||||
|
switch (true) {
|
||||||
|
case vIndex < columnIndex:
|
||||||
|
return vItem
|
||||||
|
case vIndex === columnIndex:
|
||||||
|
return index
|
||||||
|
default:
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
for (let i = 0; i <= arr.length - 1; i++) {
|
||||||
|
if (i) {
|
||||||
|
if (picker) {
|
||||||
|
picker.setColumnValues(i, columnlist[columnlist.length - 1][arr[i - 1]].children)
|
||||||
|
}
|
||||||
|
columnlist.push(columnlist[columnlist.length - 1][arr[i - 1]].children)
|
||||||
|
} else {
|
||||||
|
columnlist.push(this.tree)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.VarColumnsIndex = arr
|
||||||
|
this.VarColumns = columnlist
|
||||||
|
},
|
||||||
|
formatValue(val) {
|
||||||
|
if (Array.isArray(val)) {
|
||||||
|
if (typeof val[0] === 'object') {
|
||||||
|
return val.map(item => item[this.labelName]).join(this.joinSymbel)
|
||||||
|
} else {
|
||||||
|
return val.join(this.joinSymbel)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -116,6 +116,13 @@
|
|||||||
<u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input>
|
<u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<u-form-item label="工作地址" labelWidth="70" prop="jobAddress" borderBottom ref="item1"
|
||||||
|
@click="showjobAddress = true; hideKeyboard()">
|
||||||
|
<PickerTree placeholder="请选择行业" :tree="area.data" valueName="value" :visibel="showjobAddress"
|
||||||
|
v-model="info.jobAddress" @cancel="showjobAddress = false" border="none" returnValue="label"
|
||||||
|
:deep="3">
|
||||||
|
</PickerTree>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
|
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@@ -160,6 +167,10 @@
|
|||||||
findTradeList,
|
findTradeList,
|
||||||
getDictionary
|
getDictionary
|
||||||
} from '@/api/userrecruit.js'
|
} from '@/api/userrecruit.js'
|
||||||
|
import PickerTree from './enterpriceCertification/pickerTree.vue'
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -180,6 +191,7 @@
|
|||||||
value: '',
|
value: '',
|
||||||
showCalendar: false,
|
showCalendar: false,
|
||||||
showStime: false,
|
showStime: false,
|
||||||
|
showjobAddress: false,
|
||||||
showEtime: false,
|
showEtime: false,
|
||||||
info: {
|
info: {
|
||||||
jobName: '', // 招工名称
|
jobName: '', // 招工名称
|
||||||
@@ -201,6 +213,7 @@
|
|||||||
ageDesc: dic.ageArr[0][0].label, // 年龄要求
|
ageDesc: dic.ageArr[0][0].label, // 年龄要求
|
||||||
education: dic.eduArr[0][0].value, // 学历要求
|
education: dic.eduArr[0][0].value, // 学历要求
|
||||||
experienceDesc: dic.expeArr[0][0].label, // 经验要求
|
experienceDesc: dic.expeArr[0][0].label, // 经验要求
|
||||||
|
jobAddress: '',
|
||||||
jobCompanyName: '', // 企业名称
|
jobCompanyName: '', // 企业名称
|
||||||
jobCompanyScale: '', // 企业信用代码
|
jobCompanyScale: '', // 企业信用代码
|
||||||
jobCompanyIndustry: '', // 所属行业
|
jobCompanyIndustry: '', // 所属行业
|
||||||
@@ -305,6 +318,12 @@
|
|||||||
message: '请选择经验要求',
|
message: '请选择经验要求',
|
||||||
trigger: ['change']
|
trigger: ['change']
|
||||||
},
|
},
|
||||||
|
jobAddress: {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
message: '请选择工作地址',
|
||||||
|
trigger: ['change']
|
||||||
|
},
|
||||||
jobCompanyName: {
|
jobCompanyName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
@@ -356,11 +375,17 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
PickerTree
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
company: {
|
company: {
|
||||||
default: null,
|
default: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['area'])
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
const {
|
const {
|
||||||
id: staId,
|
id: staId,
|
||||||
@@ -373,6 +398,7 @@
|
|||||||
}
|
}
|
||||||
this.getWorkTypes()
|
this.getWorkTypes()
|
||||||
this.dictionary()
|
this.dictionary()
|
||||||
|
console.log(this.area)
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
company(val) {
|
company(val) {
|
||||||
@@ -632,6 +658,7 @@
|
|||||||
'education',
|
'education',
|
||||||
'educationLabel',
|
'educationLabel',
|
||||||
'experienceDesc',
|
'experienceDesc',
|
||||||
|
'jobAddress',
|
||||||
'jobCompanyName',
|
'jobCompanyName',
|
||||||
'jobCompanyScale',
|
'jobCompanyScale',
|
||||||
'jobCompanyIndustry',
|
'jobCompanyIndustry',
|
||||||
|
|||||||
@@ -120,12 +120,13 @@
|
|||||||
<u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="座机" prop="callNumber" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input>
|
<u--input v-model="info.callNumber" border="none" placeholder="请输入座机"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<!-- <u-form-item label="工作地址" labelWidth="80" prop="jobAddress" borderBottom ref="item1"
|
<u-form-item label="工作地址" labelWidth="70" prop="jobAddress" borderBottom ref="item1"
|
||||||
@click="showjobAddress = true; hideKeyboard()">
|
@click="showjobAddress = true; hideKeyboard()">
|
||||||
<PickerList placeholder="请选择行业" :columns="dic.tradeArr" labelName="name" valueName="id"
|
<PickerTree placeholder="请选择行业" :tree="area.data" valueName="value" :visibel="showjobAddress"
|
||||||
:visibel="showjobAddress" v-model="info.jobAddress" @cancel="showjobAddress = false">
|
v-model="info.jobAddress" @cancel="showjobAddress = false" border="none" returnValue="label"
|
||||||
</PickerList>
|
:deep="3">
|
||||||
</u-form-item> -->
|
</PickerTree>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="详细地址" prop="address" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
|
<u--input v-model="info.address" border="none" placeholder="请输入详细地址"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@@ -164,14 +165,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import dic from '@/common/dic.js'
|
import dic from '@/common/dic.js'
|
||||||
// import area from '@/untils/area.js'
|
|
||||||
import {
|
import {
|
||||||
submitInfo,
|
submitInfo,
|
||||||
getWorktypesBaseList,
|
getWorktypesBaseList,
|
||||||
findTradeList,
|
findTradeList,
|
||||||
getDictionary
|
getDictionary
|
||||||
} from '@/api/userrecruit.js'
|
} from '@/api/userrecruit.js'
|
||||||
import PickerList from './enterpriceCertification/pickerList.vue'
|
import PickerTree from './enterpriceCertification/pickerTree.vue'
|
||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
@@ -217,6 +217,7 @@
|
|||||||
ageDesc: dic.ageArr[0][0].label, // 年龄要求
|
ageDesc: dic.ageArr[0][0].label, // 年龄要求
|
||||||
education: dic.eduArr[0][0].value, // 学历要求
|
education: dic.eduArr[0][0].value, // 学历要求
|
||||||
experienceDesc: dic.expeArr[0][0].label, // 经验要求
|
experienceDesc: dic.expeArr[0][0].label, // 经验要求
|
||||||
|
jobAddress: '',
|
||||||
jobCompanyName: '', // 企业名称
|
jobCompanyName: '', // 企业名称
|
||||||
jobCompanyScale: '', // 企业信用代码
|
jobCompanyScale: '', // 企业信用代码
|
||||||
jobCompanyIndustry: '', // 所属行业
|
jobCompanyIndustry: '', // 所属行业
|
||||||
@@ -321,6 +322,12 @@
|
|||||||
message: '请选择经验要求',
|
message: '请选择经验要求',
|
||||||
trigger: ['change']
|
trigger: ['change']
|
||||||
},
|
},
|
||||||
|
jobAddress: {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
message: '请选择工作地址',
|
||||||
|
trigger: ['change']
|
||||||
|
},
|
||||||
jobCompanyName: {
|
jobCompanyName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
@@ -378,7 +385,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
PickerList
|
PickerTree
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['area'])
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const {
|
const {
|
||||||
@@ -387,7 +397,7 @@
|
|||||||
} = dic.wageUnitCategoryState[0].filter(item => item.id == 3)[0]
|
} = dic.wageUnitCategoryState[0].filter(item => item.id == 3)[0]
|
||||||
this.info.wageUnitCategory = staId
|
this.info.wageUnitCategory = staId
|
||||||
this.info.wageUnitCategoryName = staLabel
|
this.info.wageUnitCategoryName = staLabel
|
||||||
// console.log(area)
|
console.log(this.area)
|
||||||
this.getWorkTypes()
|
this.getWorkTypes()
|
||||||
this.dictionary()
|
this.dictionary()
|
||||||
if (this.company) {
|
if (this.company) {
|
||||||
@@ -653,6 +663,7 @@
|
|||||||
'education',
|
'education',
|
||||||
'educationLabel',
|
'educationLabel',
|
||||||
'experienceDesc',
|
'experienceDesc',
|
||||||
|
'jobAddress',
|
||||||
'jobCompanyName',
|
'jobCompanyName',
|
||||||
'jobCompanyScale',
|
'jobCompanyScale',
|
||||||
'jobCompanyIndustry',
|
'jobCompanyIndustry',
|
||||||
|
|||||||
@@ -1,72 +1,93 @@
|
|||||||
import areaData from '@/untils/area';
|
import areaData from '@/untils/area';
|
||||||
|
|
||||||
function format(data) {
|
function format(data) {
|
||||||
const result = [];
|
const result = [];
|
||||||
const children = {};
|
const children = {};
|
||||||
const dic = {
|
const dic = {
|
||||||
'0': {
|
'0': {
|
||||||
label: 'root',
|
label: 'root',
|
||||||
value: '0',
|
value: '0',
|
||||||
children: result
|
children: result
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
if (item.layer > 3) {
|
if (item.layer > 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const node = {
|
const node = {
|
||||||
label: item.areaName,
|
label: item.areaName,
|
||||||
value: item.areaId,
|
value: item.areaId,
|
||||||
quickQuery: item.quickQuery,
|
quickQuery: item.quickQuery,
|
||||||
simpleSpelling: item.simpleSpelling,
|
simpleSpelling: item.simpleSpelling,
|
||||||
parentId: item.parentId
|
parentId: item.parentId
|
||||||
};
|
};
|
||||||
if (children.hasOwnProperty(item.parentId)) {
|
if (dic.hasOwnProperty(item.parentId)) {
|
||||||
children[item.parentId].push(node);
|
if (!dic[item.parentId].children) {
|
||||||
} else {
|
dic[item.parentId].children = [];
|
||||||
children[item.parentId] = [node];
|
}
|
||||||
}
|
dic[item.parentId].children.push(node);
|
||||||
if (dic.hasOwnProperty(item.areaId)) {
|
} else {
|
||||||
dic[item.areaId].label = item.areaName;
|
dic[item.parentId] = {
|
||||||
dic[item.areaId].value = item.areaId;
|
children: [node]
|
||||||
} else {
|
};
|
||||||
dic[item.areaId] = node;
|
}
|
||||||
}
|
if (children.hasOwnProperty(item.parentId)) {
|
||||||
});
|
children[item.parentId].push(node);
|
||||||
return {
|
} else {
|
||||||
data: result,
|
children[item.parentId] = [node];
|
||||||
children,
|
}
|
||||||
dic
|
if (dic.hasOwnProperty(item.areaId)) {
|
||||||
};
|
dic[item.areaId].label = item.areaName;
|
||||||
}
|
dic[item.areaId].value = item.areaId;
|
||||||
|
} else {
|
||||||
let loaded = false
|
dic[item.areaId] = node;
|
||||||
|
}
|
||||||
const data = format(areaData)
|
});
|
||||||
const area = {
|
return {
|
||||||
state: {
|
data: result,
|
||||||
...data
|
children,
|
||||||
},
|
dic
|
||||||
actions: {},
|
};
|
||||||
mutations: {
|
}
|
||||||
SET_AREA: (state, data) => {
|
|
||||||
state.data = data.data
|
let loaded = false
|
||||||
state.dic = data.dic
|
|
||||||
},
|
const data = format(areaData)
|
||||||
},
|
const area = {
|
||||||
getters: {
|
state: {
|
||||||
getAreaParents: (state) => (id) => {
|
...data
|
||||||
const res = [];
|
},
|
||||||
let item = state.dic[id];
|
actions: {
|
||||||
while (item && item.value !== '0') {
|
InitArea({
|
||||||
id = item.parentId;
|
commit
|
||||||
res.unshift(item);
|
}) {
|
||||||
item = state.dic[id];
|
if (!loaded) {
|
||||||
}
|
loaded = true
|
||||||
return res
|
import('@/untils/area.js').then((resp) => {
|
||||||
}
|
commit('SET_AREA', format(resp.default));
|
||||||
}
|
})
|
||||||
};
|
}
|
||||||
|
},
|
||||||
export default area;
|
},
|
||||||
|
mutations: {
|
||||||
|
SET_AREA: (state, data) => {
|
||||||
|
state.data = data.data
|
||||||
|
state.dic = data.dic
|
||||||
|
},
|
||||||
|
},
|
||||||
|
getters: {
|
||||||
|
getAreaParents: (state) => (id) => {
|
||||||
|
const res = [];
|
||||||
|
let item = state.dic[id];
|
||||||
|
while (item && item.value !== '0') {
|
||||||
|
id = item.parentId;
|
||||||
|
res.unshift(item);
|
||||||
|
item = state.dic[id];
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default area;
|
||||||
@@ -3,7 +3,7 @@ module.exports = {
|
|||||||
port: 1887,
|
port: 1887,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://192.168.1.106:8000',
|
target: 'http://localhost:8000',
|
||||||
ws: true,
|
ws: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': '/'
|
'^/api': '/'
|
||||||
|
|||||||
Reference in New Issue
Block a user