Browse Source

Merge branch 'dev-新新版' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-新新版

dev2
jiangyy 3 years ago
parent
commit
6e9bdc8c5c
  1. 2
      src/assets/scss/common-dai.scss
  2. 31
      src/views/components/rangeInput.vue
  3. 448
      src/views/components/resiSearch.vue
  4. 12
      src/views/main-sidebar-sub-menu.vue
  5. 40
      src/views/main-sidebar.vue
  6. 4
      src/views/main.vue
  7. 34
      src/views/modules/base/resi.vue

2
src/assets/scss/common-dai.scss

@ -478,7 +478,7 @@ img {
bottom: 0; bottom: 0;
z-index: 1020; z-index: 1020;
width: $sidebar--width + $sidebar--width-fold; width: $sidebar--width + $sidebar--width-fold;
overflow: hidden; // overflow: hidden;
transition: width 0.3s; transition: width 0.3s;
background-color: transparent; background-color: transparent;

31
src/views/components/rangeInput.vue

@ -1,19 +1,18 @@
<template> <template>
<el-form :model="inputForm" <el-form :model="inputForm"
:rules="rules"
class="demo-form-inline"> class="demo-form-inline">
<div class="flex-div"> <div class="flex-div">
<el-form-item prop="start"> <el-form-item prop="start">
<el-input v-model="inputForm.start" <el-input v-model="inputForm.start"
class="wd50" class="item_width_normal"
size="small" size="small"
:type="inputType" :type="inputType"
clearable clearable
placeholder="请输入" placeholder="请输入"
@change="handleChange" /> @change="handleChange" />
</el-form-item> </el-form-item>
<div class="div_middle">-</div> <!-- <el-form-item prop="end">
<el-form-item prop="end">
<el-input v-model="inputForm.end" <el-input v-model="inputForm.end"
class="wd50" class="wd50"
size="small" size="small"
@ -22,7 +21,7 @@
placeholder="请输入" placeholder="请输入"
@change="handleChange" @change="handleChange"
@blur="handleBlur" /> @blur="handleBlur" />
</el-form-item> </el-form-item> -->
</div> </div>
</el-form> </el-form>
@ -66,11 +65,7 @@ export default {
} }
return { return {
inputForm: { ...this.value }, inputForm: { ...this.value },
rules: {
end: [
{ validator: checkAge, trigger: 'blur' }
],
}
} }
}, },
computed: { computed: {
@ -80,6 +75,7 @@ export default {
}, },
watch: { watch: {
'value.start' (val) { 'value.start' (val) {
console.log(val);
this.inputForm.start = val this.inputForm.start = val
}, },
'value.end' (val) { 'value.end' (val) {
@ -88,7 +84,7 @@ export default {
}, },
methods: { methods: {
handleChange (val) { handleChange (val) {
console.log(this.inputForm );
// if () // if ()
this.$emit('change', { ...this.inputForm }) this.$emit('change', { ...this.inputForm })
}, },
@ -102,13 +98,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.flex-div { .flex-div {
display: flex; display: flex;
align-items: inherit; align-items: center;
max-width: 200px; max-width: 200px;
height: 37px;
}
.wd50 {
width: 79px;
} }
// .wd50 {
// // width: 45%;
// }
.demo-form-inline { .demo-form-inline {
::v-deep { ::v-deep {
.el-form-item { .el-form-item {
@ -127,8 +122,6 @@ export default {
} }
.div_middle { .div_middle {
padding: 0 3px; padding: 0 10px;
position: relative;
bottom: 10px;
} }
</style> </style>

448
src/views/components/resiSearch.vue

@ -3,213 +3,115 @@
<!-- <el-card class="resi-card"> --> <!-- <el-card class="resi-card"> -->
<div> <div>
<el-form :inline="true" <el-form :inline="true" class="header_form_box" v-for="(item, index) in sliceList(itemList, 4)"
:label-width="'100px'" :class="boxHeight ? 'setFormBoxHeightAuto' : 'setFormBoxHeight'" :key="index">
class="header_form_box" <el-form-item v-for="n in item" :key="n.id">
v-for="(item, index) in sliceList(itemList, 4)" <div class="resi-cell">
:class="boxHeight?'setFormBoxHeightAuto':'setFormBoxHeight'" <div style="width:100px;text-align: right;">{{ n.label }}:</div>
:key="index"> <div class="resi-cell-value" :class="n.itemType === 'radio' && 'resi-cell-value-radio'">
<el-form-item v-for="n in item" <el-input v-if="n.itemType === 'input' || n.itemType === 'textarea'" v-model.trim="form[n.columnName]"
:key="n.id" class="item_width_normal" size="small" clearable placeholder="请输入内容">
:span="computdSpan(item.length)" </el-input>
:label="n.label" <template v-else-if="n.itemType == 'inputRange'">
class="margin0"> <!-- <el-input
<el-input v-if="n.itemType === 'input' || n.itemType === 'textarea'"
v-model.trim="form[n.columnName]"
class="item_width_normal"
size="small"
clearable
placeholder="请输入内容">
</el-input>
<template v-else-if="n.itemType == 'inputRange'">
<!-- <el-input
v-model.trim="form[n.columnName]" v-model.trim="form[n.columnName]"
class="resi-cell-input" class="resi-cell-input"
size="small" size="small"
clearable clearable
placeholder="请输入内容" placeholder="请输入内容"
/> --> /> -->
<inputRange v-model="form[n.columnName]" <inputRange style="height:37px;" v-model="form[n.columnName]" :type="n.validType" @change="handleAgeChange" />
:type="n.validType" </template>
@change="handleAgeChange" /> <template v-else-if="n.itemType === 'datepicker'">
</template> <el-date-picker v-if="n.queryType === 'daterange'" v-model.trim="timer.startPickerTime"
<template v-else-if="n.itemType === 'datepicker'"> :picker-options="startPickerOptions" type="date" align="right" unlink-panels placeholder="开始时间"
<el-date-picker v-if="n.queryType === 'daterange'" class="item_width_daterang" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
v-model.trim="form[n.columnName]" </el-date-picker>
type="daterange" <el-date-picker v-if="n.queryType === 'daterange'" v-model.trim="timer.endPickerTime"
align="right" :picker-options="endPickerOptions" class="item_width_daterang data-tag" size="small" type="date"
unlink-panels value-format="yyyy-MM-dd" value="yyyy-MM-dd" placeholder="结束时间">
range-separator="至" </el-date-picker>
start-placeholder="开始日期" <el-date-picker v-else v-model.trim="form[n.columnName]" class="resi-cell-input" type="inputRange"
end-placeholder="结束日期" size="small" clearable format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期">
class="item_width_daterange2" </el-date-picker>
size="small" </template>
format="yyyy-MM-dd" <el-select v-else-if="n.itemType === 'select' || n.itemType === 'radio'" v-model.trim="form[n.columnName]"
value-format="yyyy-MM-dd"> placeholder="请选择" size="small" clearable class="item_width_normal"
</el-date-picker> :collapse-tags="n.multiSelect == 1 ? true : false" :multiple="n.multiSelect == 1 ? true : false">
<el-date-picker v-else <el-option v-for="item in n.options" :key="item.value" :label="item.label" :value="item.value">
v-model.trim="form[n.columnName]" </el-option>
class="item_width_normal" </el-select>
type="date" <el-cascader v-else-if="n.itemType === 'cascader'" v-model.trim="form[n.columnName]" :options="n.options"
size="small" :props="{ checkStrictly: true }" clearable size="small" class="resi-cell-select">
clearable </el-cascader>
format="yyyy-MM-dd" <template v-else-if="n.itemType === 'checkbox'">
value-format="yyyy-MM-dd" <el-checkbox-group v-model="form[n.columnName]">
placeholder="选择日期"> <el-checkbox v-for="ns in n.options" :key="ns.value" :label="ns.value">{{ ns.label }}</el-checkbox>
</el-date-picker> </el-checkbox-group>
</template> </template>
<el-select v-else-if="n.itemType === 'select' || n.itemType === 'radio'" </div>
v-model.trim="form[n.columnName]" </div>
placeholder="请选择"
size="small"
clearable
class="item_width_normal"
:collapse-tags="n.multiSelect == 1 ? true : false"
:multiple="n.multiSelect == 1 ? true : false">
<el-option v-for="item in n.options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-cascader v-else-if="n.itemType === 'cascader'"
v-model.trim="form[n.columnName]"
:options="n.options"
:props="{ checkStrictly: true }"
clearable
size="small"
class="resi-cell-select">
</el-cascader>
<template v-else-if="n.itemType === 'checkbox'">
<el-checkbox-group v-model="form[n.columnName]">
<el-checkbox v-for="ns in n.options"
:key="ns.value"
:label="ns.value">{{ns.label}}</el-checkbox>
</el-checkbox-group>
</template>
</el-form-item> </el-form-item>
<el-form-item label="所属组织" <el-form-item label="所属组织" prop="agencyIdArray" :label-width="'100px'" >
prop="agencyIdArray"> <el-cascader class="item_width_normal" ref="myCascader" v-model="agencyIdArray" :options="orgOptions"
<el-cascader class="item_width_normal" :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"></el-cascader>
ref="myCascader"
size="small"
v-model="agencyIdArray"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="所属房屋" <el-form-item label="所属房屋" prop="VILLAGE_ID" :label-width="'100px'" >
prop="VILLAGE_ID"> <div class="resi-cell">
<div class="resi-cell-value">
<el-select v-model.trim="form.VILLAGE_ID" <el-select v-model.trim="form.VILLAGE_ID" placeholder="请选择小区" size="small" filterable clearable
placeholder="请选择小区" class="resi-cell-select" @clear="handleClearVillage" @change="handleChangeV">
size="small" <el-option v-for="item in optionsV" :key="item.value" :label="item.label" :value="item.value">
filterable </el-option>
clearable </el-select>
class="item_width_communitycascader" <el-select v-model.trim="form.BUILD_ID" placeholder="楼号" size="small" filterable clearable
@clear="handleClearVillage" style="width: 120px;" class="resi-cell-select" :disabled="changeVDisabled" @clear="handleClearBuild"
@change="handleChangeV"> @change="handleChangeB">
<el-option v-for="item in optionsV" <el-option v-for="item in optionsB" :key="item.value" :label="item.label" :value="item.value">
:key="item.value" </el-option>
:label="item.label" </el-select>
:value="item.value"> <el-select v-model.trim="form.UNIT_ID" :disabled="changeBDisabled" placeholder="单元" size="small"
</el-option> filterable clearable style="width: 120px;" class="resi-cell-select" @click="handleClearDan"
</el-select> @change="handleChangeD">
<el-select v-model.trim="form.BUILD_ID" <el-option v-for="item in optionsD" :key="item.value" :label="item.label" :value="item.value">
placeholder="楼号" </el-option>
size="small" </el-select>
filterable <el-select v-model.trim="form.HOME_ID" :disabled="changeDDisabled" placeholder="房号" size="small"
clearable filterable clearable style="width: 120px;" class="resi-cell-select">
style="margin-left:5px" <el-option v-for="item in optionsH" :key="item.value" :label="item.label" :value="item.value">
class="item_width_buildcascader" </el-option>
:disabled="changeVDisabled" </el-select>
@clear="handleClearBuild" </div>
@change="handleChangeB"> </div>
<el-option v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="form.UNIT_ID"
:disabled="changeBDisabled"
placeholder="单元"
size="small"
filterable
clearable
style="margin-left:5px"
class="item_width_buildcascader"
@click="handleClearDan"
@change="handleChangeD">
<el-option v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="form.HOME_ID"
:disabled="changeDDisabled"
placeholder="房号"
size="small"
filterable
clearable
style="margin-left:5px"
class="item_width_buildcascader">
<el-option v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-row v-if="showSmartSearchForm" <el-row v-if="showSmartSearchForm" class="resi-row-more">
class="resi-row-more">
<el-col :span="24"> <el-col :span="24">
<el-button v-for="btnItem in btnList" <el-button v-for="btnItem in btnList" :key="btnItem.index" size="small"
:key="btnItem.index" :class="selBtnIndex === btnItem.index ? 'diy-button--blue' : 'diy-button--gray'"
size="small" @click="handelSelSmartBtn(btnItem.index)">{{ btnItem.name }}</el-button>
:class="selBtnIndex===btnItem.index?'diy-button--blue':'diy-button--gray'"
@click="handelSelSmartBtn(btnItem.index)">{{btnItem.name}}</el-button>
</el-col> </el-col>
<el-col> <el-col>
<smart-search-rule ref="ref_rule" <smart-search-rule ref="ref_rule" :formType="formType"></smart-search-rule>
:formType="formType"></smart-search-rule>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="isArrow" <el-row v-if="isArrow" class="resi-search">
class="resi-search">
<el-col :span="24"> <el-col :span="24">
<el-button size="small" <el-button type="primary" size="small" plain class="diy-button--blue"
class="diy-button--blue" @click="handleSmartSearch">智能查询</el-button>
@click="handleSmartSearch">智能查询</el-button> <el-button style="margin-left:10px" size="small" class="diy-button--white" type="primary" plain
<el-button style="margin-left:10px" @click="resetForm">重置</el-button>
size="small" <el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch" plain>查询 </el-button>
class="diy-button--white" <el-button style="margin-left:15px" size="small" class="div-table-button--blue" type="text"
@click="resetForm">重置</el-button> @click="boxHeight = !boxHeight">{{ boxHeight ? '收起' : '展开' }}<i
<el-button class="diy-button--blue" :class="boxHeight ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i></el-button>
size="small"
@click="handleSearch">查询 </el-button>
<el-button style="margin-left:15px"
size="small"
class="div-table-button--blue"
type="text"
@click="boxHeight = !boxHeight">{{boxHeight?'收起':'展开'}}<i class="el-icon-arrow-down el-icon--right"></i></el-button>
<!-- <span class="font_color_blue"
style="cursor:pointer;"
@click="boxHeight = !boxHeight">{{boxHeight?'收起':'展开'}} <i :class="boxHeight?'el-icon-arrow-up':'el-icon-arrow-down'"></i></span> -->
</el-col> </el-col>
</el-row> </el-row>
@ -242,7 +144,7 @@ export default {
default: false default: false
} }
}, },
data () { data() {
let initForm = (arr, columnName) => { let initForm = (arr, columnName) => {
let _form = {} let _form = {}
// console.log('formInfo', obj) // console.log('formInfo', obj)
@ -269,6 +171,8 @@ export default {
...item ...item
} }
}) })
let form = initForm(itemList, this.columnName) let form = initForm(itemList, this.columnName)
let tempFormList = itemList.map(item => { let tempFormList = itemList.map(item => {
@ -292,9 +196,23 @@ export default {
children: 'subAgencyList', children: 'subAgencyList',
checkStrictly: true checkStrictly: true
} }
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.updateStartDate) {
let startTime = new Date(this.updateStartDate)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return { return {
boxHeight: false, boxHeight: true,
pageLoading: false, pageLoading: false,
openSearch: false, openSearch: false,
optionsV: [], optionsV: [],
@ -306,6 +224,7 @@ export default {
orgOptionProps, orgOptionProps,
agencyIdArray: [], agencyIdArray: [],
value: '', value: '',
// 1
itemList, itemList,
fixedList: [], fixedList: [],
fixedForm: { fixedForm: {
@ -331,7 +250,7 @@ export default {
shortcuts: [ shortcuts: [
{ {
text: '最近一周', text: '最近一周',
onClick (picker) { onClick(picker) {
const end = new Date() const end = new Date()
const start = new Date() const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
@ -340,7 +259,7 @@ export default {
}, },
{ {
text: '最近一个月', text: '最近一个月',
onClick (picker) { onClick(picker) {
const end = new Date() const end = new Date()
const start = new Date() const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
@ -349,7 +268,7 @@ export default {
}, },
{ {
text: '最近三个月', text: '最近三个月',
onClick (picker) { onClick(picker) {
const end = new Date() const end = new Date()
const start = new Date() const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
@ -456,13 +375,23 @@ export default {
}, },
] ]
} }
] ],
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
timer: {
startPickerTime: '',
endPickerTime: ''
}
} }
}, },
computed: { computed: {
sliceList () { sliceList() {
return function (data, count) { return function (data, count) {
//
if (data !== undefined) { if (data !== undefined) {
let index = 0 let index = 0
let arrTemp = [] let arrTemp = []
@ -472,25 +401,25 @@ export default {
arrTemp.push([]) arrTemp.push([])
} }
arrTemp[index].push(data[i]) arrTemp[index].push(data[i])
// console.log(data[i],'zhi');
} }
console.log(arrTemp);
return arrTemp return arrTemp
} }
} }
}, },
changeVDisabled () { changeVDisabled() {
return !this.form.VILLAGE_ID return !this.form.VILLAGE_ID
}, },
changeBDisabled () { changeBDisabled() {
return !this.form.BUILD_ID return !this.form.BUILD_ID
}, },
changeDDisabled () { changeDDisabled() {
return !this.form.UNIT_ID return !this.form.UNIT_ID
}, },
}, },
watch: { watch: {
form: { form: {
handler (val, val2) { handler(val, val2) {
// console.log('valpppp----', val, val2) // console.log('valpppp----', val, val2)
for (let n in val) { for (let n in val) {
if (this.constForm[n] !== val[n]) { if (this.constForm[n] !== val[n]) {
@ -501,9 +430,16 @@ export default {
this.constForm = { ...val } this.constForm = { ...val }
}, },
deep: true deep: true
},
timer: {
handler(newVal) {
this.handelWatchStartDate(newVal)
},
deep: true,
immediate: true
} }
}, },
created () { created() {
// this.initForm() // this.initForm()
// console.log('formcccc---', this.form) // console.log('formcccc---', this.form)
this.getOrgTreeList() this.getOrgTreeList()
@ -512,47 +448,51 @@ export default {
if (this.columnName) this.handleChangeForm(this.columnName) if (this.columnName) this.handleChangeForm(this.columnName)
}, },
methods: { methods: {
handleSmartSearch () { handleSmartSearch() {
this.showSmartSearchForm = !this.showSmartSearchForm this.showSmartSearchForm = !this.showSmartSearchForm
}, },
handelSelSmartBtn(index) {
handelSelSmartBtn (index) {
this.selBtnIndex = index this.selBtnIndex = index
}, },
handelWatchStartDate(val) {
initForm () { return val
},
initForm() {
this.formList.forEach((item) => { this.formList.forEach((item) => {
this.$set(this.form, item.columnName, '') this.$set(this.form, item.columnName, '')
}) })
console.log('formcccc---', this.form) console.log('formcccc---', this.form)
}, },
computdSpan (len) { computdSpan(len) {
return len == 1 ? 24 : 6 return len == 1 ? 24 : 6
}, },
handleClearVillage () { handleClearVillage() {
this.form.BUILD_ID = '' this.form.BUILD_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
}, },
handleClearBuild () { handleClearBuild() {
this.form.BUILD_ID = '' this.form.BUILD_ID = ''
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
}, },
handleClearDan () { handleClearDan() {
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
}, },
resetForm (formName) { resetForm(formName) {
for (const n in this.form) { for (const n in this.form) {
if (n == 'age') { if (n == 'age') {
this.form.age = { this.form.age = {
start: '', start: '',
end: '' end: ''
} }
} else if (n == 'BIRTHDAY') {
this.form.BIRTHDAY = []
this.timer.startPickerTime = null
this.timer.endPickerTime = null
} else if (typeof this.form[n] == 'object') this.form[n] = [] } else if (typeof this.form[n] == 'object') this.form[n] = []
else this.form[n] = '' else this.form[n] = ''
} }
this.agencyIdArray = [] this.agencyIdArray = []
// let arr3 = [...arr1, ...arr] // let arr3 = [...arr1, ...arr]
@ -560,21 +500,20 @@ export default {
// this.handleSearch() // this.handleSearch()
// this.orgOptions = []; // this.orgOptions = [];
}, },
handleSearch () { handleSearch() {
if (this.showSmartSearchForm) { if (this.showSmartSearchForm) {
let refObj = this.$refs['ref_rule'] let refObj = this.$refs['ref_rule']
refObj.getRule() refObj.getRule()
} else { } else {
// debugger
// console.log('formmmmm---', this.form) // console.log('formmmmm---', this.form)
const itemTypes = ['daterange', 'timerange', 'checkbox'] const itemTypes = ['daterange', 'timerange', 'checkbox']
let a = this.tempFormList.filter(item => item.itemType != 'inputRange') let a = this.tempFormList.filter(item => item.itemType != 'inputRange')
let arr = a.filter((n) => n.isChange).map((item) => { let arr = a.filter(n => n.isChange).map((item) => {
return { return {
queryType: item.queryType, queryType: item.queryType,
tableName: item.tableName, tableName: item.tableName,
columnName: item.columnName, columnName: item.columnName,
// columnValue: []
columnValue: this.form[item.columnName] && columnValue: this.form[item.columnName] &&
(itemTypes.includes(item.queryType) || (itemTypes.includes(item.queryType) ||
itemTypes.includes(item.itemType) || item.multiSelect == 1 itemTypes.includes(item.itemType) || item.multiSelect == 1
@ -590,24 +529,47 @@ export default {
...item ...item
} }
}) })
let arr3 = [...arr1, ...arr2] var arr4 = []
var arr3 = [...arr1, ...arr2];
if (this.timer.startPickerTime && this.timer.endPickerTime) {
arr4 = [{
queryType: 'daterange',
tableName: 'ic_resi_user',
columnName: 'BIRTHDAY',
columnValue: [this.timer.startPickerTime || '', this.timer.endPickerTime || '']
}]
arr3 = [...arr1, ...arr2, ...arr4]
} else {
let i = arr3.findIndex(item => item.columnName == 'BIRTHDAY')
console.log(i, '标');
arr3 = arr3.splice(i,1)
console.log(arr3);
}
this.$emit('search', arr3) this.$emit('search', arr3)
arr3 = []
return arr3 return arr3
} }
}, },
handleOpenSearch () { handleOpenSearch() {
this.openSearch = !this.openSearch this.openSearch = !this.openSearch
}, },
handleAgeChange (val) { handleAgeChange(val) {
// debugger
console.log('val----age---', val) console.log('val----age---', val)
if (val.end) { // console.log(v);
const s = this.computedBirth(val.end) if(val.start){
const e = this.computedBirth(val.start) const s = this.computedBirth1(val.start)
this.form.BIRTHDAY = [s, e] const e = this.computedBirth(val.start)
} this.form.BIRTHDAY = [s, e]
}else {
this.form.BIRTHDAY = []
return
}
}, },
handleChangeAgency (val) { handleChangeAgency(val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) { if (obj) {
if (obj.level === 'grid') { if (obj.level === 'grid') {
@ -629,7 +591,7 @@ export default {
this.form.HOME_ID = '' this.form.HOME_ID = ''
this.getValiheList() this.getValiheList()
}, },
handleChangeGrid (val) { handleChangeGrid(val) {
console.log('val', val) console.log('val', val)
this.form.VILLAGE_ID = '' this.form.VILLAGE_ID = ''
this.form.BUILD_ID = '' this.form.BUILD_ID = ''
@ -637,28 +599,27 @@ export default {
this.form.HOME_ID = '' this.form.HOME_ID = ''
this.getValiheList() this.getValiheList()
}, },
handleChangeV (val) { handleChangeV(val) {
console.log('val', val) console.log('val', val)
this.form.BUILD_ID = '' this.form.BUILD_ID = ''
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
this.getBuildList() this.getBuildList()
}, },
handleChangeB (val) { handleChangeB(val) {
console.log('val', val) console.log('val', val)
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
this.getUniList() this.getUniList()
}, },
handleChangeD (val) { handleChangeD(val) {
console.log('val', val) console.log('val', val)
this.form.HOME_ID = '' this.form.HOME_ID = ''
this.getHouseList() this.getHouseList()
}, },
// form // form
handleChangeForm (val) { handleChangeForm(val) {
for (let n in this.fixedForm) { for (let n in this.fixedForm) {
if (n === val) { if (n === val) {
if (this.fixedList.length > 0) { if (this.fixedList.length > 0) {
let _item = {} let _item = {}
@ -696,7 +657,7 @@ export default {
if (item.columnName === val) item.isChange = true if (item.columnName === val) item.isChange = true
}) })
}, },
getOrgTreeList () { getOrgTreeList() {
const { user } = this.$store.state const { user } = this.$store.state
this.$http this.$http
.post('/gov/org/customeragency/agencygridtree', {}) .post('/gov/org/customeragency/agencygridtree', {})
@ -713,7 +674,7 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
getGridList () { getGridList() {
const { user } = this.$store.state const { user } = this.$store.state
this.$http this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
@ -729,7 +690,7 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
getValiheList () { getValiheList() {
const { user } = this.$store.state const { user } = this.$store.state
this.$http this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { .post('/gov/org/icneighborhood/neighborhoodoption', {
@ -749,7 +710,7 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
getBuildList () { getBuildList() {
this.$http this.$http
.post('/gov/org/icbuilding/buildingoption', { .post('/gov/org/icbuilding/buildingoption', {
neighborHoodId: this.form.VILLAGE_ID neighborHoodId: this.form.VILLAGE_ID
@ -766,7 +727,7 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
getUniList () { getUniList() {
this.$http this.$http
.post('/gov/org/icbuildingunit/unitoption', { .post('/gov/org/icbuildingunit/unitoption', {
buildingId: this.form.BUILD_ID buildingId: this.form.BUILD_ID
@ -783,7 +744,7 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
getHouseList () { getHouseList() {
this.$http this.$http
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID }) .post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID })
.then(({ data: res }) => { .then(({ data: res }) => {
@ -798,7 +759,7 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
computedBirth (age) { computedBirth(age) {
let now = new Date(); let now = new Date();
let nowYear = now.getFullYear(); let nowYear = now.getFullYear();
let nowMonth = now.getMonth() + 1; let nowMonth = now.getMonth() + 1;
@ -810,8 +771,21 @@ export default {
if (nowDay < 10) { if (nowDay < 10) {
nowDay = '0' + nowDay nowDay = '0' + nowDay
} }
console.log(subYear + '-' + nowMonth + '-' + nowDay);
return subYear + '-' + nowMonth + '-' + nowDay return subYear + '-' + nowMonth + '-' + nowDay
},
computedBirth1(age) {
let now = new Date();
let nowYear = now.getFullYear();
let nowMonth = now.getMonth() + 1;
let nowDay = now.getDate(); // daymonthmonthyearyear
let subYear = nowYear - age
if (nowMonth < 10) {
nowMonth = '0' + nowMonth
}
if (nowDay < 10) {
nowDay = '0' + nowDay
}
return subYear - 1 + '-' + nowMonth + '-' + nowDay
} }
} }
} }
@ -820,6 +794,8 @@ export default {
<style lang="scss" scope> <style lang="scss" scope>
@import "@/assets/scss/modules/management/list-main.scss"; @import "@/assets/scss/modules/management/list-main.scss";
@import "@/assets/scss/modules/visual/communityManage.scss"; @import "@/assets/scss/modules/visual/communityManage.scss";
.header_form_box { .header_form_box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

12
src/views/main-sidebar-sub-menu.vue

@ -15,7 +15,7 @@
> >
<use :xlink:href="`#${menu.icon}`" /> <use :xlink:href="`#${menu.icon}`" />
</svg> </svg>
<span>{{ menu.name }}</span> <span :title="menu.name">{{ menu.name }}</span>
</template> </template>
<sub-menu <sub-menu
:root="false" :root="false"
@ -29,7 +29,7 @@
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true"> <svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`" /> <use :xlink:href="`#${menu.icon}`" />
</svg> </svg>
<span>{{ menu.name }}</span> <span :title="menu.name">{{ menu.name }}</span>
</el-menu-item> </el-menu-item>
</div> </div>
</template> </template>
@ -69,3 +69,11 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
@import "~@/assets/scss/c/function.scss";
/deep/ .el-menu-item {
@include toe;
}
</style>

40
src/views/main-sidebar.vue

@ -3,7 +3,7 @@
<aside :class="['aui-sidebar', 'g-sd']"> <aside :class="['aui-sidebar', 'g-sd']">
<div class="m-nav"> <div class="m-nav">
<div class="nav"> <div class="nav">
<div class="nav-item" @click="toIndexPage"> <div class="nav-item" @click="toIndexPage" v-if="false">
<span>全部菜单</span> <span>全部菜单</span>
</div> </div>
@ -15,7 +15,11 @@
:key="menu.id" :key="menu.id"
@click="gotoRouteHandle(menu.id, idx)" @click="gotoRouteHandle(menu.id, idx)"
> >
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true"> <svg
v-if="menu.icon"
class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true"
>
<use :xlink:href="`#${menu.icon}`" /> <use :xlink:href="`#${menu.icon}`" />
</svg> </svg>
<span>{{ menu.name }}</span> <span>{{ menu.name }}</span>
@ -27,6 +31,15 @@
</div> </div>
</div> </div>
<div
class="m-folder"
v-show="$store.state.sidebarActiveSubMenuList.length != 0"
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
>
<i class="el-icon-s-fold" v-show="!$store.state.sidebarFold"></i>
<i class="el-icon-s-unfold" v-show="$store.state.sidebarFold"></i>
</div>
<div <div
class="aui-sidebar_wrap" class="aui-sidebar_wrap"
v-show="$store.state.sidebarActiveSubMenuList.length != 0" v-show="$store.state.sidebarActiveSubMenuList.length != 0"
@ -105,6 +118,25 @@ export default {
display: flex; display: flex;
} }
/deep/ .m-folder {
position: absolute;
z-index: 100;
top: 50px;
right: -16px;
width: 32px;
height: 32px;
background: #ffffff;
box-shadow: 0px 5px 12px 4px rgba(0, 0, 0, 0.09),
0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 1px 2px -2px rgba(0, 0, 0, 0.16);
line-height: 32px;
font-size: 18px;
text-align: center;
color: #666;
border-radius: 100%;
overflow: hidden;
cursor: pointer;
}
/deep/ .m-nav { /deep/ .m-nav {
box-sizing: border-box; box-sizing: border-box;
padding: 25px 0; padding: 25px 0;
@ -120,11 +152,11 @@ export default {
padding: 11px 0 9px 0; padding: 11px 0 9px 0;
cursor: pointer; cursor: pointer;
.icon-svg { .icon-svg {
font-size: 18px; font-size: 22px;
margin-bottom: 6px;
} }
span { span {
display: block; display: block;
line-height: 30px;
} }
&:hover, &:hover,
&.z-on { &.z-on {

4
src/views/main.vue

@ -5,7 +5,9 @@
:class="[ :class="[
'aui-wrapper', 'aui-wrapper',
{ {
'aui-sidebar--fold': $store.state.sidebarActiveSubMenuList.length == 0, 'aui-sidebar--fold':
$store.state.sidebarActiveSubMenuList.length == 0 ||
$store.state.sidebarFold,
}, },
{ {
'aui-sidebar--noside': $store.state.inIframe, 'aui-sidebar--noside': $store.state.inIframe,

34
src/views/modules/base/resi.vue

@ -505,6 +505,8 @@ export default {
} }
await this.getSearchList(); await this.getSearchList();
// await this.getFormList() // await this.getFormList()
await this.getTableHeader(); await this.getTableHeader();
// console.log('this.$refs.resiSearch', this) // console.log('this.$refs.resiSearch', this)
@ -707,7 +709,6 @@ export default {
// console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`]) // console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`])
}); });
console.log("search-----refs", this.$refs); console.log("search-----refs", this.$refs);
console.log("search-----arr", arr); console.log("search-----arr", arr);
this.currentPage = 1; this.currentPage = 1;
this.conditions = arr; this.conditions = arr;
@ -1156,15 +1157,32 @@ export default {
}, },
async getTableData () { async getTableData () {
this.tableLoading = true; this.tableLoading = true;
// console.log(this.conditions);
// if(this.conditions.columnName){
// columnValue
// }
// var index = this.conditions.findIndex(item=>item.columnName === 'BIRTHDAY' )
// this.conditions.filter(item=>{
// if(item.columnName === "BIRTHDAY") {
// console.log(this.$refs.resiSearch.endPickerTime);
// item.columnValue = [this.$refs.resiSearch.endPickerTime,this.$refs.resiSearch.startPickerTime]
// }
// })
// console.log(this.conditions);
let timer = this.$refs.resiSearch.handelWatchStartDate()
console.log(timer,'派发');
let params = { let params = {
formCode: "resi_base_info", formCode: "resi_base_info",
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
conditions: this.conditions, conditions: this.conditions,
}; };
// debugger
await this.$http await this.$http
.post("/epmetuser/icresiuser/listresi", params) .post("/epmetuser/icresiuser/listresi", params)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
@ -1183,7 +1201,9 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
console.log(this.conditions);
return this.$message.error("网络错误"); return this.$message.error("网络错误");
}); });
this.tableLoading = false; this.tableLoading = false;
}, },
@ -1315,6 +1335,7 @@ export default {
}); });
}); });
this.searchList = res.data; this.searchList = res.data;
console.log( this.searchList);
} }
}) })
.catch(() => { .catch(() => {
@ -1337,6 +1358,7 @@ export default {
return arr; return arr;
}, },
async getFormList (type) { async getFormList (type) {
// debugger
await this.$http await this.$http
.post("/oper/customize/icform/getcustomerform", { .post("/oper/customize/icform/getcustomerform", {
formCode: "resi_base_info", formCode: "resi_base_info",
@ -1346,6 +1368,7 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log(res.data,'res.data');
console.log("获取详情成功getFormList"); console.log("获取详情成功getFormList");
let { itemList, groupList, formName } = res.data; let { itemList, groupList, formName } = res.data;
this.formName = formName; this.formName = formName;
@ -1488,11 +1511,6 @@ export default {
background: #ffffff; background: #ffffff;
border-color: #0055d7; border-color: #0055d7;
} }
::v-deep .el-button--primary.is-plain:hover {
color: #fff;
background: #0055d7;
border-color: #0055d7;
}
.resi-container .resi-card-table { .resi-container .resi-card-table {
::v-deep .el-table th { ::v-deep .el-table th {
color: #fff; color: #fff;
@ -1585,7 +1603,9 @@ export default {
width: calc(100% - 100px); width: calc(100% - 100px);
} }
} }
::v-deep .el-form-item--medium .el-form-item__label {
padding: 0px;
}
.resi-btns { .resi-btns {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;

Loading…
Cancel
Save