Compare commits

...

2 Commits

Author SHA1 Message Date
xy f99d570cec 导入
11 months ago
xy af07ca0c46 调整
11 months ago

Binary file not shown.

@ -52,6 +52,11 @@ const actions = {
key: "fenlei",
op: "neq",
value: 1
},
{
key: "department_id",
op: "eq",
value: state.is_auth == 1 ? 2 : ''
}
],
is_auth: state.is_auth
@ -65,6 +70,11 @@ const actions = {
key: "fenlei",
op: "neq",
value: 1
},
{
key: "department_id",
op: "eq",
value: state.is_auth == 1 ? 2 : ''
}
],
is_auth: state.is_auth

@ -18,6 +18,7 @@ const getDefaultState = () => {
name: '',
avatar: '',
roles: [],
allowLevel: '',
department: {}
}
}
@ -25,6 +26,9 @@ const getDefaultState = () => {
const state = getDefaultState()
const mutations = {
SET_ALLOW_LEVEL: (state, value) => {
state.allowLevel = value
},
RESET_STATE: (state) => {
Object.assign(state, getDefaultState())
},
@ -91,11 +95,11 @@ const actions = {
roles,
name,
avatar,
minAllowLevel,
department
} = response
commit('SET_ALLOW_LEVEL', minAllowLevel)
commit('SET_ROLES', roles)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)

@ -2,6 +2,7 @@
import { save, show, index, destroy, imports } from "@/api/system/baseForm";
import { CreateDialog } from "@/utils/createDialog"
import { deepCopy } from "@/utils";
import { show as customFormFieldShow } from "@/api/system/customFormField";
import { resolveFormInfo } from '@/utils/createTable'
export default {
components: {
@ -195,6 +196,7 @@ export default {
table-item={
[
{
prop: "selection",
type: "selection",
width: 56,
align: "center",
@ -219,7 +221,7 @@ export default {
"width": 0,
"align": "center",
"formatter": (data, row, value) => {
return this.wxAreas[value-1]
return this.wxAreas.get(value)
}
},
{
@ -319,6 +321,7 @@ export default {
table-item={
[
{
prop: "selection",
type: "selection",
width: 56,
align: "center",
@ -343,7 +346,7 @@ export default {
"width": 0,
"align": "center",
"formatter": (data, row, value) => {
return this.wxAreas[value-1]
return this.wxAreas.get(value)
}
},
{
@ -424,15 +427,7 @@ export default {
},
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
customForm: {
customFormId: "",
tableName: ""
@ -464,6 +459,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
setRow (row) {
this.row = row
@ -681,6 +694,7 @@ export default {
},
},
created() {
this.getWxAreas();
this.getTableParams();
this.id = this.$route.query.id;
this.type = this.$route.query.type;

@ -2,6 +2,7 @@
import { save, show, index, destroy } from "@/api/system/baseForm";
import { CreateDialog } from "@/utils/createDialog";
import { deepCopy } from "@/utils";
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
props: {
formInfo: {
@ -169,16 +170,7 @@ export default {
prop: "area",
width: 80,
formatter: (data, row, value) => {
let map = new Map([
[1, "宜兴市"],
[2, "惠山区"],
[3, "新吴区"],
[4, "梁溪区"],
[5, "江阴市"],
[6, "滨湖区"],
[7, "锡山区"],
]);
return map.get(value);
return this.wxAreas.get(value);
},
},
{
@ -257,6 +249,7 @@ export default {
},
data() {
return {
wxAreas: new Map(),
columns: 1,
id: "",
type: "add",
@ -271,6 +264,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
init() {
for (let key in this.form) {
if (this.form[key] instanceof Array) {
@ -575,6 +586,9 @@ export default {
}
},
},
created() {
this.getWxAreas()
}
};
</script>

@ -81,6 +81,7 @@ import add from "@/views/assets/component/addFiles.vue"
import LxHeader from "@/components/LxHeader/index.vue";
import headerContent from "@/components/LxHeader/XyContent.vue";
import { download } from '@/utils/downloadRequest'
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
components: {
LxHeader,
@ -90,15 +91,7 @@ export default {
mixins: [authMixin],
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
codeUri: "",
showModal: false,
table: [
@ -184,6 +177,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
getFiles,
open(url) {
@ -202,6 +213,7 @@ export default {
computed: {
},
created() {
this.getWxAreas()
},
};
</script>

@ -3,6 +3,7 @@ import { save, show, index, destroy, imports } from "@/api/system/baseForm";
import { CreateDialog } from "@/utils/createDialog";
import { deepCopy } from "@/utils";
import { resolveFormInfo } from "@/utils/createTable";
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
components: {},
props: {
@ -268,7 +269,7 @@ export default {
width: 0,
align: "center",
"formatter": (data, row, value) => {
return this.wxAreas[value]
return this.wxAreas.get(value)
}
},
{
@ -506,7 +507,7 @@ export default {
width: 0,
align: "center",
"formatter": (data, row, value) => {
return this.wxAreas[value]
return this.wxAreas.get(value)
}
},
{
@ -644,15 +645,7 @@ export default {
},
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
customForm: {
customFormId: "",
tableName: ""
@ -683,6 +676,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
setRow(row) {
this.row = row;
@ -905,6 +916,7 @@ export default {
},
},
created() {
this.getWxAreas()
this.getTableParams();
this.id = this.$route.query.handleId;
this.type = this.$route.query.type;

@ -145,11 +145,11 @@ export default {
console.log(res)
this.$message({
type: 'success',
message: `成功导入${res.total}`
message: `总计${res.total},成功导入${res.total-res.fail}`
})
this.hidden();
this.$emit('refresh')
})
this.hidden();
this.$emit('refresh')
}
},
computed: {},

@ -29,18 +29,19 @@
placeholder="请选择区域"
>
<el-option
v-for="(item, index) in wxAreas"
:value="index + 1"
:label="item"
v-for="(item, index) in Array.from(wxAreas)"
:value="item[0]"
:label="item[1]"
></el-option>
</el-select>
<span class="search-name">资产权属</span>
<el-switch v-model="is_auth" :active-value="1" :inactive-value="0" active-text="本部" inactive-text="全部"></el-switch>
<el-switch v-if="$store.state.user.allowLevel === 0" v-model="is_auth" :active-value="1" :inactive-value="0" active-text="本部" inactive-text="全部"></el-switch>
<el-select
v-if="$store.state.user.allowLevel === 0"
v-model="selectDepartmentId"
v-show="!is_auth"
clearable
style="width: 110px;"
style="width: 110px;margin-left: 4px;"
size="mini"
placeholder="请选择公司"
>
@ -62,9 +63,9 @@
<div
class="search-list__bar"
>
<Button size="small" type="success" :ghost="hasHouse !== 1" @click="hasHouse = 1,getList(1)">土地</Button>
<Button size="small" type="primary" :ghost="hasHouse !== 2" @click="hasHouse = 2,getList(2)">房产</Button>
<Button size="small" type="info" :ghost="hasHouse !== 3" @click="hasHouse = 3,getList(3)">全部</Button>
<Button size="small" type="success" :ghost="hasHouse !== 1" @click="hasHouse = 1,areaPick()">土地</Button>
<Button size="small" type="primary" :ghost="hasHouse !== 2" @click="hasHouse = 2,areaPick()">房产</Button>
<Button size="small" type="info" :ghost="hasHouse !== 3" @click="hasHouse = 3,areaPick()">全部</Button>
<el-input size="mini" style="margin-top: 4px;" placeholder="请输入资产名称" v-model="select.filter[1].value" clearable>
<el-button type="primary" slot="append" icon="el-icon-search" @click="areaPick"></el-button>
</el-input>
@ -76,11 +77,12 @@
<div class="left">
<p>{{ item.name }}</p>
<Tag :color="item.hasOwnProperty('land_id') ? 'green' : 'purple'">{{ item.hasOwnProperty('land_id') ? '房产' : '土地' }}</Tag>
<Tag color="blue" v-if="item.area">{{ wxAreas[item.area-1] }}</Tag>
<Tag color="blue" v-if="item.area">{{ wxAreas.get(item.area) }}</Tag>
<!-- <Tag color="cyan" v-if="item.shijimianji">{{ item.shijimianji }} m²</Tag>-->
<Tag color="red" v-if="Object.hasOwn(item,'id_house_properties_land_id_relation')">{{ item.id_house_properties_land_id_relation ? '' : '' }}</Tag>
<Tag color="gold" v-if="item.jianzhuleixing">{{ jianzhuleixing(item.jianzhuleixing) }}</Tag>
<Tag color="magenta" v-if="item.zichanleixing">{{ zichanleixing(item.zichanleixing) }}</Tag>
<Tag color="primary" v-if="item.department"><i class="el-icon-office-building"></i> {{ item.department.name }}</Tag>
</div>
<div class="right">
<Button type="primary" @click="pickRow({ row:item })">查看</Button>
@ -100,7 +102,7 @@
<div class="map" id="map" :style="{ height: mapHeight + 'px' }"></div>
<div ref="infoWindow" id="infoWindow" v-show="isShowInfoWindow">
<el-scrollbar style="height: 260px; width: 100%">
<el-scrollbar style="height: 48vh; width: 100%">
<el-descriptions border :column="2">
<el-descriptions-item v-for="item in form" :label="item.name">
{{ contentFormat(item) }}{{ units.get(item.field) }}
@ -108,6 +110,9 @@
<el-descriptions-item label="使用状态">
{{ shiyongzhuangtai }}
</el-descriptions-item>
<el-descriptions-item label="所属公司">
{{ openData.department ? openData.department.name : '' }}
</el-descriptions-item>
</el-descriptions>
</el-scrollbar>
@ -128,6 +133,7 @@ import { listdept } from "@/api/system/department";
import { getparameter } from "@/api/system/dictionary";
import { listCommondepartment } from '@/api/common'
import { deepCopy } from '@/utils'
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
name: "mapList",
data() {
@ -212,15 +218,7 @@ export default {
polygons: [],
markerList: [],
departments: [],
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
units: new Map([
["dengjimianji", "m²"],
["shijimianji", "m²"],
@ -231,9 +229,27 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
areaPick(e) {
this.areaBG(this.wxAreas[this.select.filter[0].value - 1]);
this.areaBG(this.wxAreas.get(this.select.filter[0].value));
this.getList().then((res) => {
this.setMapMarker();
});
@ -743,12 +759,13 @@ export default {
}
},
created() {
this.getWxAreas();
this.getDepts();
this.getFormDetail();
},
async mounted() {
let areaId = Number(this.$route.query.area) || ''
areaId ? (this.init(this.wxAreas[areaId - 1]),this.select.filter[0].value = areaId) : this.init();
areaId ? (this.init(this.wxAreas.get(areaId)),this.select.filter[0].value = areaId) : this.init();
await this.getList();
this.setMapMarker();
@ -1008,14 +1025,14 @@ $staticsHeight: 60px;
</style>
<style lang="scss">
#infoWindow {
min-width: 480px;
max-height: 340px;
min-width: 58vw;
max-height: 48vh;
box-sizing: border-box;
filter: drop-shadow(2px 2px 5px #00000055);
border-radius: 0 4px 4px 4px;
background: #fff;
padding: 2px;
padding: 4px;
animation: fade-in 0.4s forwards;
position: relative;
}

@ -23,6 +23,7 @@ import * as echarts from 'echarts'
import 'echarts-gl'
import WUXI from '@/assets/wuxi.json'
import tooltip from './tooltip.vue'
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
components: {
@ -76,6 +77,24 @@ export default {
}
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.areas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
authChange (e) {
this.$store.commit('bigdata/SET_AUTH', e.target.value)
this.$store.dispatch('bigdata/getAssets')
@ -230,6 +249,9 @@ export default {
this.setOption()
}
},
created() {
this.getWxAreas()
},
mounted() {
this.initMap();
}

@ -36,6 +36,13 @@ export default {
},row.name)
}
},
{
key: 'department.name',
title: '所属公司',
width: 180,
align: 'center',
render: (h, { row }) => h('div', row.department ? row.department.name : '')
},
{
key: "shijimianji",
title: "实际面积",
@ -124,7 +131,7 @@ export default {
<style scoped lang="scss">
.table {
width: 420px;
width: 606px;
border-radius: 20px;
}

@ -3,6 +3,7 @@ import { save, show, index, destroy } from "@/api/system/baseForm";
import { CreateDialog } from "@/utils/createDialog"
import { deepCopy } from "@/utils";
import { resolveFormInfo } from '@/utils/createTable'
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
props: {
tableName: String,
@ -57,6 +58,8 @@ export default {
}
<el-drawer title="土地列表"
modal-append-to-body
append-to-body
visible={this.landDialog}
size="64%"
on={{
@ -68,6 +71,7 @@ export default {
table-item={
[
{
prop: 'selection',
type: "selection",
width: 56,
align: "center",
@ -89,7 +93,10 @@ export default {
"prop": "area",
"label": "区域",
"width": 0,
"align": "center"
"align": "center",
"formatter": (data, row, value) => {
return this.wxAreas.get(value)
}
},
{
"prop": "name",
@ -237,7 +244,7 @@ export default {
on={{
['loaded']: _ => {
this.$nextTick(() => {
this.$refs['landLinkTable'].getListData()?.filter(item => this.originalForm.id_leases_to_assets_lease_id_relation.find(j => j.land_id === item.id))?.forEach(item => {
this.$refs['landLinkTable'].getListData()?.filter(item => this.originalForm.id_leases_to_assets_lease_id_relation?.find(j => j.land_id === item.id))?.forEach(item => {
this.$refs['landLinkTable'].toggleRowSelection(item, true)
})
++this.landSelectTemp;
@ -250,6 +257,8 @@ export default {
</el-drawer>
<el-drawer title="房产列表"
modal-append-to-body
append-to-body
visible={this.houseDialog}
size="64%"
on={{
@ -261,6 +270,7 @@ export default {
table-item={
[
{
prop: 'selection',
type: "selection",
width: 56,
align: "center",
@ -282,7 +292,10 @@ export default {
"prop": "area",
"label": "区域",
"width": 0,
"align": "center"
"align": "center",
"formatter": (data, row, value) => {
return this.wxAreas.get(value)
}
},
{
"prop": "name",
@ -384,7 +397,7 @@ export default {
on={{
['loaded']: _ => {
this.$nextTick(() => {
this.$refs['houseLinkTable'].getListData()?.filter(item => this.originalForm.id_leases_to_assets_lease_id_relation.find(j => j.house_id === item.id))?.forEach(item => {
this.$refs['houseLinkTable'].getListData()?.filter(item => this.originalForm.id_leases_to_assets_lease_id_relation?.find(j => j.house_id === item.id))?.forEach(item => {
this.$refs['houseLinkTable'].toggleRowSelection(item, true)
})
++this.houseSelectTemp;
@ -400,6 +413,7 @@ export default {
},
data() {
return {
wxAreas: new Map(),
houseDialog: false,
houseSelectTemp: 0,
landDialog: false,
@ -418,6 +432,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
setRow (row) {
this.row = row
@ -590,6 +622,7 @@ export default {
},
},
created() {
this.getWxAreas()
resolveFormInfo(15).then(res => this.formInfo = res)
}
};

@ -3,6 +3,7 @@ import { save, show, index, destroy, imports } from "@/api/system/baseForm";
import { CreateDialog } from "@/utils/createDialog";
import { deepCopy } from "@/utils";
import { resolveFormInfo } from "@/utils/createTable";
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
components: {},
props: {
@ -359,7 +360,7 @@ export default {
width: 80,
align: "center",
formatter: (data, row, value) => {
return this.wxAreas[value-1];
return this.wxAreas.get(value);
},
},
{
@ -533,7 +534,7 @@ export default {
width: 80,
align: "center",
formatter: (data, row, value) => {
return this.wxAreas[value-1];
return this.wxAreas.get(value);
},
},
{
@ -625,15 +626,7 @@ export default {
},
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
nowAssets: [],
houseDialog: false,
landDialog: false,
@ -661,6 +654,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
setRow(row) {
this.row = row;
@ -898,6 +909,7 @@ export default {
},
},
created() {
this.getWxAreas()
this.id = this.$route.query.letId;
this.type = this.$route.query.type;
resolveFormInfo(31).then((res) => {

@ -45,7 +45,7 @@ import XLSX from "xlsx-js-style";
// import * as XLSX from "xlsx";
import { saveAs } from "file-saver";
import { getToken } from "@/utils/auth";
import { imports } from "@/api/system/baseForm";
import { imports, index } from '@/api/system/baseForm'
export default {
props: {
formInfo: {
@ -56,16 +56,45 @@ export default {
},
data() {
return {
assets: {
lands: [],
houses: []
},
action: `${process.env.VUE_APP_BASE_API}api/admin/base-form/excel-show`,
dialogVisible: false,
headers: [],
tableList: [],
table: [],
fileUrl: '/租赁模版.xlsx',
fileUrl: './租赁模版.xlsx',
};
},
methods: {
getAssets() {
Promise.all([
index({
table_name: "houses",
page: 1,
page_size: 999,
filter: [],
is_more_auth: 1
},false),
index({
table_name: "lands",
page: 1,
page_size: 999,
filter: [],
is_more_auth: 1
})
]).then(res => {
const [houses,lands] = res;
this.assets = {
lands: lands.data,
houses: houses.data
}
console.log(345, this.assets)
})
},
getToken,
show() {
this.dialogVisible = true;
@ -115,6 +144,7 @@ export default {
let linkTableName = new Map([
['标的类型', 'biaodileixing'],
['租赁标的', 'name'],
['详细位置', 'xiangxiweizhi'],
['租赁面积', 'chuzumianji']
])
let formatData = []
@ -137,6 +167,13 @@ export default {
if (merges.find(j => index > j.rs && index <= j.re)) {
Array.from(linkTableName.keys()).forEach((header, index1) => {
link[linkTableName.get(header)] = row[index1]
if (header === '租赁标的') {
if (this.assets.lands.find(i => i.name === row[index1])) {
link.land_id = this.assets.lands.find(i => i.name === row[index1]).id
} else if (this.assets.houses.find(i => i.name === row[index1])) {
link.house_id = this.assets.lands.find(i => i.name === row[index1]).id
}
}
})
formatData[merges.find(j => index >= j.rs && index <= j.re).rs]["id_leases_to_assets_lease_id_relation"].push(link)
index++
@ -144,6 +181,13 @@ export default {
headers.forEach((header, index1) => {
if (Array.from(linkTableName.keys()).indexOf(header) !== -1) {
link[linkTableName.get(header)] = row[index1] instanceof Date ? this.$moment(row[index1]).format('YYYY-MM-DD') : row[index1]
if (header === '租赁标的') {
if (this.assets.lands.find(i => i.name === row[index1])) {
link.land_id = this.assets.lands.find(i => i.name === row[index1]).id
} else if (this.assets.houses.find(i => i.name === row[index1])) {
link.house_id = this.assets.lands.find(i => i.name === row[index1]).id
}
}
} else {
let field = this.formInfo.find(j => j.name === header)
if (field) {
@ -164,8 +208,10 @@ export default {
}).then(res => {
this.$message({
type: 'success',
message: `成功导入${res.total}`
message: `总计${res.total},成功导入${res.total-res.fail}`
})
this.hidden();
this.$emit('refresh')
})
};
//
@ -239,6 +285,9 @@ export default {
}
},
},
created() {
this.getAssets()
}
};
</script>

@ -3,6 +3,7 @@ import { save, show, index, destroy, imports } from "@/api/system/baseForm";
import { CreateDialog } from "@/utils/createDialog";
import { deepCopy } from "@/utils";
import { resolveFormInfo } from "@/utils/createTable";
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
components: {},
props: {
@ -397,15 +398,7 @@ export default {
},
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
isShowOldData: true,
nowAssets: [],
oldNowAssets: [],
@ -440,6 +433,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
getCustomForm () {
if (this.$route.meta.params?.custom_form) {
let decode = decodeURIComponent(this.$route.meta.params?.custom_form);
@ -592,6 +603,7 @@ export default {
},
},
created() {
this.getWxAreas()
this.id = this.$route.params.id;
this.getCustomForm();
resolveFormInfo(this.customForm.customFormId).then((res) => {

@ -4,6 +4,7 @@ import { CreateDialog } from "@/utils/createDialog";
import { deepCopy } from "@/utils";
import { resolveFormInfo } from "@/utils/createTable";
import { listCommondepartment } from "@/api/common"
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
components: {},
props: {
@ -1023,7 +1024,7 @@ export default {
width: 0,
align: "center",
"formatter": (data, row, value) => {
return this.wxAreas[value-1]
return this.wxAreas.get(value)
}
},
{
@ -1203,7 +1204,7 @@ export default {
width: 0,
align: "center",
"formatter": (data, row, value) => {
return this.wxAreas[value-1]
return this.wxAreas.get(value)
}
},
{
@ -1297,15 +1298,7 @@ export default {
data() {
return {
departments: [],
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
isShowOldData: true,
nowAssets: [],
oldNowAssets: [],
@ -1345,6 +1338,24 @@ export default {
};
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
setRow(row) {
this.row = row;
@ -1659,6 +1670,7 @@ export default {
},
},
created() {
this.getWxAreas()
this.getDepts()
this.id = this.$route.query.leaseId;
this.type = this.$route.query.type;

@ -9,6 +9,7 @@ import { pieChart } from "@/api/statics"
import { index } from "@/api/system/baseForm";
import * as echarts from 'echarts'
import resize from '@/components/Charts/mixins/resize'
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
mixins: [resize],
@ -33,19 +34,14 @@ export default {
},
data() {
return {
wxAreas: [
"宜兴市",
"惠山区",
"新吴区",
"梁溪区",
"江阴市",
"滨湖区",
"锡山区",
],
wxAreas: new Map(),
chart: null,
data: { houseList:[], landList:[] },
}
},
created() {
this.getWxAreas()
},
mounted() {
this.getData().then(() => {
this.initChart()
@ -59,6 +55,24 @@ export default {
this.chart = null
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.wxAreas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
async getData () {
const res = await pieChart({ year: this.year.getFullYear() })
console.log(res)

@ -50,6 +50,7 @@ import LxHeader from '@/components/LxHeader';
import headerContent from '@/components/LxHeader/XyContent.vue'
import { authMixin } from '@/mixin/authMixin';
import { index } from "@/api/system/baseForm"
import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
mixins: [authMixin],
@ -213,6 +214,24 @@ export default {
}
},
methods: {
async getWxAreas () {
try {
const res = await customFormFieldShow({ id: 120 })
let keys = Object.keys(res.select_item)
if (keys.length > 0) {
this.areas = new Map(keys.map((key) => {
return [
/^\d*$/.test(res.select_item[key])
? Number(res.select_item[key])
: res.select_item[key],
key
]
}))
}
} catch (err) {
}
},
index,
async getData () {
this.spanArr = [];
@ -283,6 +302,7 @@ export default {
},
computed: {},
created() {
this.getWxAreas();
this.getData();
}
}

Loading…
Cancel
Save