Browse Source

Merge branch 'dev-shuju' into prod

shibei_master
13176889840 4 years ago
parent
commit
de7cf1e141
  1. 4
      src/views/components/editResi.vue
  2. 11
      src/views/components/resiForm.vue
  3. 9
      src/views/modules/visual/cpts/analyse.vue

4
src/views/components/editResi.vue

@ -19,7 +19,7 @@
<!-- <div class="resi-cell-label">{{n.label}}</div> --> <!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value"> <div class="resi-cell-value">
<el-select v-model.trim="form.GRID_ID" :disabled="disabled" placeholder="请选择网格" size="small" <el-select v-model.trim="form.GRID_ID" :disabled="disabled" placeholder="请选择网格" size="small"
clearable class="resi-cell-select" clearable class="resi-cell-select" @change="handleChangeGrid"
> >
<el-option <el-option
v-for="item in optionsG" v-for="item in optionsG"
@ -36,7 +36,7 @@
<el-form-item prop="VILLAGE_ID" label="所属小区" required> <el-form-item prop="VILLAGE_ID" label="所属小区" required>
<div class="resi-cell-value"> <div class="resi-cell-value">
<el-select v-model.trim="form.VILLAGE_ID" :disabled="disabled" placeholder="请选择小区" size="small" <el-select v-model.trim="form.VILLAGE_ID" :disabled="disabled" placeholder="请选择小区" size="small"
clearable class="resi-cell-select" clearable class="resi-cell-select" @change="handleChangeV"
> >
<el-option <el-option
v-for="item in optionsV" v-for="item in optionsV"

11
src/views/components/resiForm.vue

@ -330,13 +330,15 @@ export default {
} }
let initForm = (obj, arr) => { let initForm = (obj, arr) => {
let _form = {} let _form = {}
// console.log('formInfo', obj) console.log('formInfo---arr', arr)
if (Object.keys(obj).length > 0) { if (Object.keys(obj).length > 0) {
_form = { ...obj } _form = { ...obj }
return _form return _form
} }
arr.forEach(item => { arr.forEach(item => {
if (item.multiSelect) _form[item.columnName] = [] if (item.multiSelect) _form[item.columnName] = []
else if (item.itemType == 'radio' && item.defaultValue == '0') _form[item.columnName] = item.defaultValue
else _form[item.columnName] = '' else _form[item.columnName] = ''
// if (item.optionSourceType === 'remote') { // if (item.optionSourceType === 'remote') {
@ -371,7 +373,12 @@ export default {
let form = initForm(this.formInfo, this.formList) let form = initForm(this.formInfo, this.formList)
let rules = initRules(this.formList) let rules = initRules(this.formList)
console.log('rulessss', rules) console.log('rulessss', rules)
let tempFormList = [ ...this.formList ] let tempFormList = [ ...this.formList ].map(item => {
return {
...item,
isChange: (item.itemType == 'radio' && item.defaultValue == '0') ? true : false
}
})
let constForm = { let constForm = {
...form, ...form,
GRID_ID: '', GRID_ID: '',

9
src/views/modules/visual/cpts/analyse.vue

@ -83,7 +83,7 @@
<div class="analys-col analys-col-wr analys-col-more list-wr" <div class="analys-col analys-col-wr analys-col-more list-wr"
id="scroll-wr"> id="scroll-wr">
<div class="cate-list cate-list-child"> <div class="cate-list cate-list-child" :style="'padding-top:' + computedPd(tempList)">
<div v-for="(item, index) in tempList" <div v-for="(item, index) in tempList"
:key="index" :key="index"
class="cate-row"> class="cate-row">
@ -275,12 +275,19 @@ export default {
} }
return statusObj[status] return statusObj[status]
}, },
computedPd(list) {
if (this.sourceTab == 'group') return '60px'
if (list.length == 1) return '330px'
else if (list.length == 2) return '240px'
else return '60px'
},
handleTabs (type) { handleTabs (type) {
if (type === 'group') this.tempList = [...this.singleList] if (type === 'group') this.tempList = [...this.singleList]
else if (type === 'event') this.tempList = [...this.moreList] else if (type === 'event') this.tempList = [...this.moreList]
this.sourceTab = type this.sourceTab = type
const _dom = document.getElementById('scroll-wr') const _dom = document.getElementById('scroll-wr')
_dom.scrollTop = 0 _dom.scrollTop = 0
this.computedPd(this.tempList)
}, },
handleProject (item) { handleProject (item) {
this.$emit('project', item) this.$emit('project', item)

Loading…
Cancel
Save