@@ -152,7 +212,7 @@ export default {
default: () => []
}
},
- data () {
+ data() {
let initForm = (arr) => {
let _form = {}
// console.log('formInfo', obj)
@@ -160,13 +220,13 @@ export default {
// _form = { ...obj }
// return _form
// }
- arr.forEach(item => {
+ arr.forEach((item) => {
_form[item.columnName] = ''
})
return _form
}
let form = initForm(this.formList)
- let tempFormList = [ ...this.formList ]
+ let tempFormList = [...this.formList]
let constForm = {
...form,
GRID_ID: '',
@@ -203,36 +263,40 @@ export default {
},
tempFormList,
pickerOptions: {
- shortcuts: [{
- text: '最近一周',
- onClick (picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
- picker.$emit('pick', [start, end])
- }
- }, {
- text: '最近一个月',
- onClick (picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
- picker.$emit('pick', [start, end])
- }
- }, {
- text: '最近三个月',
- onClick (picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
- picker.$emit('pick', [start, end])
+ shortcuts: [
+ {
+ text: '最近一周',
+ onClick(picker) {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+ picker.$emit('pick', [start, end])
+ }
+ },
+ {
+ text: '最近一个月',
+ onClick(picker) {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+ picker.$emit('pick', [start, end])
+ }
+ },
+ {
+ text: '最近三个月',
+ onClick(picker) {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+ picker.$emit('pick', [start, end])
+ }
}
- }]
+ ]
}
}
},
computed: {
- sliceList () {
+ sliceList() {
return function (data, count) {
if (data !== undefined) {
let index = 0
@@ -248,19 +312,19 @@ export default {
}
}
},
- changeVDisabled () {
+ changeVDisabled() {
return !this.form.VILLAGE_ID
},
- changeBDisabled () {
+ changeBDisabled() {
return !this.form.BUILD_ID
},
- changeDDisabled () {
+ changeDDisabled() {
return !this.form.UNIT_ID
}
},
watch: {
form: {
- handler (val, val2) {
+ handler(val, val2) {
// console.log('valpppp----', val, val2)
for (let n in val) {
if (this.constForm[n] !== val[n]) {
@@ -273,55 +337,64 @@ export default {
deep: true
}
},
- created () {
+ created() {
// this.initForm()
// console.log('formcccc---', this.form)
this.getGridList()
+ this.getValiheList()
},
methods: {
- initForm () {
- this.formList.forEach(item => {
+ initForm() {
+ this.formList.forEach((item) => {
this.$set(this.form, item.columnName, '')
})
console.log('formcccc---', this.form)
},
- handleClearVillage () {
+ handleClearVillage() {
this.form.BUILD_ID = ''
this.form.HOME_ID = ''
},
- handleClearBuild () {
+ handleClearBuild() {
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
},
- handleClearDan () {
+ handleClearDan() {
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
},
- handleSearch () {
+ handleSearch() {
// console.log('formmmmm---', this.form)
const itemTypes = ['daterange', 'timerange']
- let arr = this.tempFormList.filter(n => n.isChange).map(item => {
- return {
- queryType: item.queryType,
- tableName: item.tableName,
- columnName: item.columnName,
- // columnValue: []
- columnValue: (itemTypes.includes(item.queryType) || itemTypes.includes(item.itemType)) ? this.form[item.columnName] : [this.form[item.columnName].toString()]
- }
- })
- let arr1 = this.fixedList.filter(n => n.columnValue.length > 0).map(item => {
- return {
- ...item
- }
- })
- let arr3 = [ ...arr1, ...arr ]
+ let arr = this.tempFormList
+ .filter((n) => n.isChange)
+ .map((item) => {
+ return {
+ queryType: item.queryType,
+ tableName: item.tableName,
+ columnName: item.columnName,
+ // columnValue: []
+ columnValue:
+ itemTypes.includes(item.queryType) ||
+ itemTypes.includes(item.itemType)
+ ? this.form[item.columnName]
+ : [this.form[item.columnName].toString()]
+ }
+ })
+ let arr1 = this.fixedList
+ .filter((n) => n.columnValue.length > 0)
+ .map((item) => {
+ return {
+ ...item
+ }
+ })
+ let arr3 = [...arr1, ...arr]
this.$emit('search', arr3)
},
- handleOpenSearch () {
+ handleOpenSearch() {
this.openSearch = !this.openSearch
},
- handleChangeGrid (val) {
+ handleChangeGrid(val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
@@ -329,26 +402,26 @@ export default {
this.form.HOME_ID = ''
this.getValiheList()
},
- handleChangeV (val) {
+ handleChangeV(val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
},
- handleChangeB (val) {
+ handleChangeB(val) {
console.log('val', val)
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getUniList()
},
- handleChangeD (val) {
+ handleChangeD(val) {
console.log('val', val)
this.form.HOME_ID = ''
this.getHouseList()
},
// 监听基础form
- handleChangeForm (val) {
+ handleChangeForm(val) {
for (let n in this.fixedForm) {
if (n === val) {
if (this.fixedList.length > 0) {
@@ -378,11 +451,11 @@ export default {
}
}
console.log('fixedList----999', this.fixedList)
- this.tempFormList.forEach(item => {
+ this.tempFormList.forEach((item) => {
if (item.columnName === val) item.isChange = true
})
},
- getGridList () {
+ getGridList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId })
@@ -398,10 +471,13 @@ export default {
return this.$message.error('网络错误')
})
},
- getValiheList () {
+ getValiheList() {
const { user } = this.$store.state
this.$http
- .post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, agencyId: user.agencyId })
+ .post('/gov/org/icneighborhood/neighborhoodoption', {
+ gridId: this.form.GRID_ID,
+ agencyId: user.agencyId
+ })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@@ -414,9 +490,11 @@ export default {
return this.$message.error('网络错误')
})
},
- getBuildList () {
+ getBuildList() {
this.$http
- .post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID })
+ .post('/gov/org/icbuilding/buildingoption', {
+ neighborHoodId: this.form.VILLAGE_ID
+ })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@@ -429,9 +507,11 @@ export default {
return this.$message.error('网络错误')
})
},
- getUniList () {
+ getUniList() {
this.$http
- .post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID })
+ .post('/gov/org/icbuildingunit/unitoption', {
+ buildingId: this.form.BUILD_ID
+ })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@@ -444,7 +524,7 @@ export default {
return this.$message.error('网络错误')
})
},
- getHouseList () {
+ getHouseList() {
this.$http
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID })
.then(({ data: res }) => {
@@ -458,7 +538,7 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
- },
+ }
}
}
@@ -480,7 +560,7 @@ export default {
box-sizing: border-box;
margin-left: -23rpx;
cursor: pointer;
- background: #FFFFFF;
+ background: #ffffff;
border-radius: 0 0 10px 10px;
img {
display: block;
@@ -489,11 +569,11 @@ export default {
.resi-row-box {
height: 104px;
overflow: hidden;
- transition: height .5s;
+ transition: height 0.5s;
}
.resi-row-more {
height: max-content;
- transition: height .5s;
+ transition: height 0.5s;
}
.resi-row {
margin-bottom: 20px;
From 1915fd7d0891772156e6647c55b67643742644ee Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Fri, 5 Nov 2021 16:18:58 +0800
Subject: [PATCH 10/26] 111
---
src/views/components/resiSearch.vue | 6 +-
src/views/modules/base/resi.vue | 365 +++++++++++++++++-----------
2 files changed, 228 insertions(+), 143 deletions(-)
diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue
index 41c00cf2..925367a1 100644
--- a/src/views/components/resiSearch.vue
+++ b/src/views/components/resiSearch.vue
@@ -134,7 +134,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
- class="resi-cell-input"
+ class="resi-cell--daterange"
size="small"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@@ -588,6 +588,7 @@ export default {
display: flex;
align-items: center;
.resi-cell-label {
+ flex-shrink: 0;
width: 70px;
box-sizing: border-box;
margin-right: 15px;
@@ -602,6 +603,9 @@ export default {
.resi-cell-input {
width: 180px;
}
+ .resi-cell--daterange {
+ width: 100%;
+ }
.resi-cell-select {
width: 180px;
box-sizing: border-box;
diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue
index c5251801..fcd7ed4f 100644
--- a/src/views/modules/base/resi.vue
+++ b/src/views/modules/base/resi.vue
@@ -1,11 +1,19 @@
-
+
-
- 新增
- 导出
+ 新增
+ 导出
@@ -14,11 +22,9 @@
v-loading="tableLoading"
border
style="width: 100%"
- class="resi-table">
-
+ class="resi-table"
+ >
+
+ :width="item.itemType === 'radio' ? 80 : 180"
+ >
- {{ handleFilterSpan(scope.row, item)}}
+ {{ handleFilterSpan(scope.row, item) }}
-
+
- 查看
+ 查看
- 编辑
+ 编辑
- 删除
+ 删除
-
@@ -59,63 +79,112 @@
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next"
- :total="total">
+ :total="total"
+ >
-
-
+ :before-close="handlerCancle"
+ >
+
+
取消
- 提交
+ 提交
-
-
-
+ :before-close="handlerEditCancle"
+ >
+
+
取消
- 提交
+ 提交
-
@@ -129,7 +198,7 @@ export default {
resiForm,
editResi
},
- data () {
+ data() {
return {
tableLoading: false,
btnLoading: false,
@@ -150,15 +219,14 @@ export default {
BUILD_ID: '',
HOME_ID: ''
},
- editTableName: {
-
- },
+ editTableName: {},
+ formName: '',
formList: [],
tableHeader: [],
tabsList: []
}
},
- async created () {
+ async created() {
await this.getSearchList()
// await this.getFormList()
await this.getTableHeader()
@@ -167,38 +235,38 @@ export default {
console.log('storeoooo----0000', this.$store)
},
methods: {
- filterEdit (id) {
+ filterEdit(id) {
const { user } = this.$store.state
return id === user.agencyId
},
- handleSizeChange (val) {
+ handleSizeChange(val) {
console.log(`每页 ${val} 条`)
this.pageSize = val
this.getTableData()
},
- handleCurrentChange (val) {
+ handleCurrentChange(val) {
console.log(`当前页: ${val}`)
this.currentPage = val
this.getTableData()
},
- handleFilterSpan (row, item) {
+ handleFilterSpan(row, item) {
let _val = ''
if (item.itemType === 'radio' && item.options.length > 0) {
- item.options.forEach(n => {
+ item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label
})
}
return _val || row[item.columnName]
},
- handleSearch (val) {
+ handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
this.conditions = val
this.getTableData()
},
// 下载文件
- download (data, fileName) {
- console.log('data',data)
+ download(data, fileName) {
+ console.log('data', data)
if (!data) {
return
}
@@ -206,29 +274,28 @@ export default {
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- window.navigator.msSaveOrOpenBlob(csvData, fileName);
+ window.navigator.msSaveOrOpenBlob(csvData, fileName)
}
// for Non-IE (chrome, firefox etc.)
else {
- var a = document.createElement('a');
- document.body.appendChild(a);
- a.style = 'display: none';
- var url = window.URL.createObjectURL(csvData);
- a.href = url;
- a.download = fileName;
- a.click();
- a.remove();
- window.URL.revokeObjectURL(url);
+ var a = document.createElement('a')
+ document.body.appendChild(a)
+ a.style = 'display: none'
+ var url = window.URL.createObjectURL(csvData)
+ a.href = url
+ a.download = fileName
+ a.click()
+ a.remove()
+ window.URL.revokeObjectURL(url)
}
-
},
- handleExport () {
+ handleExport() {
let params = {
formCode: 'resi_base_info',
conditions: this.conditions
}
- // .post('epmetuser/icresiuser/exportExcel', params)
+ // .post('epmetuser/icresiuser/exportExcel', params)
this.$http({
url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
@@ -237,46 +304,47 @@ export default {
headers: { 'Content-Type': 'application/x-download' }
},
responseType: 'blob'
- }).then(({ data: res }) => {
+ })
+ .then(({ data: res }) => {
// var headerData = res.headers
// this.download(res, '人员数据.xlsx')
- console.log('res',res)
+ console.log('res', res)
const fileName = '人员数据.xlsx'
- let blob = new Blob([res], {type: 'application/vnd.ms-excel'})
- var url = window.URL.createObjectURL(blob);
- var aLink = document.createElement("a");
- aLink.style.display = "none";
- aLink.href = url;
- aLink.setAttribute("download", fileName);
- document.body.appendChild(aLink);
- aLink.click();
- document.body.removeChild(aLink); //下载完成移除元素
- window.URL.revokeObjectURL(url); //释放掉blob对象
+ let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+ var url = window.URL.createObjectURL(blob)
+ var aLink = document.createElement('a')
+ aLink.style.display = 'none'
+ aLink.href = url
+ aLink.setAttribute('download', fileName)
+ document.body.appendChild(aLink)
+ aLink.click()
+ document.body.removeChild(aLink) //下载完成移除元素
+ window.URL.revokeObjectURL(url) //释放掉blob对象
// window.location.href = res.data
})
- .catch(err => {
+ .catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
})
},
- handleClick (tab, event) {
+ handleClick(tab, event) {
console.log(tab, event)
},
- async handleLook (row) {
+ async handleLook(row) {
this.disabled = true
await this.getFormList()
this.getrowInfo(row.icResiUserId)
},
- async handleEdit (row) {
+ async handleEdit(row) {
this.disabled = false
await this.getFormList('edit')
await this.getrowInfo(row.icResiUserId)
},
- async handleAdd () {
+ async handleAdd() {
await this.getFormList()
this.dialogVisible = true
},
- async handleChangeGroup (val) {
+ async handleChangeGroup(val) {
console.log('changeguoprrrrr----', val)
let { childGroup, value } = val
let hasT = false
@@ -291,9 +359,9 @@ export default {
if (value === 1 || value === '1') {
// console.log('changegroup----999', value)
if (!hasT) {
- childGroup.itemList.forEach(async item => {
+ childGroup.itemList.forEach(async (item) => {
if (item.optionSourceType === 'remote') {
- await this.getOptionsList(item.optionSourceValue).then(res => {
+ await this.getOptionsList(item.optionSourceValue).then((res) => {
item.options = res
})
// console.log('')
@@ -306,17 +374,19 @@ export default {
if (hasT) this.tabsList.splice(i, 1)
}
},
- formetForm () {
+ formetForm() {
const _baseForm = this.$refs.baseForm.handleForm()
let arr = []
if (_baseForm.length === 0) return false
- arr.push([ ..._baseForm ])
- this.tabsList.forEach(item => {
- arr.push([ ...this.$refs['group' + item.groupId][0].handleForm() ])
+ arr.push([..._baseForm])
+ this.tabsList.forEach((item) => {
+ arr.push([...this.$refs['group' + item.groupId][0].handleForm()])
+ })
+ let arr2 = arr.reduce(function (a, b) {
+ return a.concat(b)
})
- let arr2 = arr.reduce(function (a, b) { return a.concat(b) })
let noChange = true
- arr2.forEach(item => {
+ arr2.forEach((item) => {
if (item.list.length !== 0) noChange = false
})
console.log('arr2', arr2)
@@ -344,11 +414,12 @@ export default {
})
console.log('res', res)
// 多个list合并成一个list子集
- res.forEach(item => {
+ res.forEach((item) => {
let _form = {}
- item.list.length > 0 && item.list.forEach(n => {
- _form = { ..._form, ...n }
- })
+ item.list.length > 0 &&
+ item.list.forEach((n) => {
+ _form = { ..._form, ...n }
+ })
if (item.list.length > 0) {
finalArr.push({
tableName: item.tableName,
@@ -359,15 +430,15 @@ export default {
console.log('finalArr', finalArr)
return finalArr
},
- async handleEditSUbmit () {
+ async handleEditSUbmit() {
const arr = await this.formetForm()
if (arr) this.submitEdit(arr)
},
- async handleSUbmit () {
+ async handleSUbmit() {
const arr = await this.formetForm()
if (arr) this.submitAdd(arr)
},
- handleDel (row) {
+ handleDel(row) {
let params = {
formCode: 'resi_base_info',
icResiUserId: row.icResiUserId
@@ -386,24 +457,24 @@ export default {
return this.$message.error('网络错误')
})
},
- handleFormatUrl (url) {
+ handleFormatUrl(url) {
return url.includes('?')
},
- handlerEditCancle () {
+ handlerEditCancle() {
this.$refs.baseForm.resetForm()
- this.tabsList.forEach(item => {
+ this.tabsList.forEach((item) => {
this.$refs['group' + item.groupId][0].resetForm()
})
this.dialogEditVisible = false
},
- handlerCancle () {
+ handlerCancle() {
this.$refs.baseForm.resetForm()
- this.tabsList.forEach(item => {
+ this.tabsList.forEach((item) => {
this.$refs['group' + item.groupId][0].resetForm()
})
this.dialogVisible = false
},
- async submitAdd (arr) {
+ async submitAdd(arr) {
this.btnLoading = true
await this.$http
.post('/epmetuser/icresiuser/add', arr)
@@ -414,7 +485,7 @@ export default {
this.$message.success('提交成功')
// this.$refs[formName].resetFields();
this.$refs.baseForm.resetForm()
- this.tabsList.forEach(item => {
+ this.tabsList.forEach((item) => {
this.$refs['group' + item.groupId][0].resetForm()
})
this.getTableData()
@@ -424,21 +495,20 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
- this.btnLoading = false
+ this.btnLoading = false
},
- async submitEdit (arr) {
+ async submitEdit(arr) {
this.btnLoading = true
await this.$http
.post('/epmetuser/icresiuser/edit', arr)
.then(({ data: res }) => {
if (res.code !== 0) {
-
return this.$message.error(res.msg)
} else {
this.$message.success('提交成功')
// this.$refs[formName].resetFields();
this.$refs.baseForm.resetForm()
- this.tabsList.forEach(item => {
+ this.tabsList.forEach((item) => {
this.$refs['group' + item.groupId][0].resetForm()
})
this.getTableData()
@@ -448,11 +518,13 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
- this.btnLoading = false
+ this.btnLoading = false
},
- getTableHeader () {
+ getTableHeader() {
this.$http
- .post('/oper/customize/icform/tableheaders', { formCode: 'resi_base_info' })
+ .post('/oper/customize/icform/tableheaders', {
+ formCode: 'resi_base_info'
+ })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@@ -464,7 +536,7 @@ export default {
return this.$message.error('网络错误')
})
},
- async getTableData () {
+ async getTableData() {
this.tableLoading = true
let params = {
formCode: 'resi_base_info',
@@ -485,9 +557,9 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
- this.tableLoading = false
+ this.tableLoading = false
},
- getrowInfo (id) {
+ getrowInfo(id) {
let params = {
formCode: 'resi_base_info',
icResiUserId: id
@@ -505,7 +577,7 @@ export default {
for (let n in list) {
this.editForm[n] = list[n]
}
- this.formList.forEach(item => {
+ this.formList.forEach((item) => {
if (item.childGroup && info[item.childGroup.tableName]) {
// let _info = info[item.childGroup.tableName]
// item.childGroup.itemList.forEach(n => {
@@ -516,7 +588,7 @@ export default {
item.columnValue = list[item.columnName]
item.ID = list.ID
})
- this.tabsList.forEach(item => {
+ this.tabsList.forEach((item) => {
let _info = info[item.tableName]
if (item.supportAdd) {
// console.log('tabsList---333', item.label)
@@ -527,7 +599,7 @@ export default {
// console.log('mutiList----555' + index, mutiList, _list)
mutiList.splice(index, 0, {
row: index,
- itemList: _list.map(m => {
+ itemList: _list.map((m) => {
// console.log('itemList---item' + index, m)
return {
...m,
@@ -542,7 +614,7 @@ export default {
item.mutiList = mutiList
} else {
if (_info) {
- item.itemList.forEach(n => {
+ item.itemList.forEach((n) => {
n.ID = _info[0].ID
n.columnValue = _info[0][n.columnName]
})
@@ -558,7 +630,7 @@ export default {
return this.$message.error('网络错误')
})
},
- async getOptionsList (url) {
+ async getOptionsList(url) {
let options = []
// console.log('getOptionsList----', url)
await this.$http
@@ -575,18 +647,21 @@ export default {
})
return options
},
- getSearchList () {
+ getSearchList() {
this.$http
- .post('/oper/customize/icform/conditionlist', { formCode: 'resi_base_info', dynamic: true })
+ .post('/oper/customize/icform/conditionlist', {
+ formCode: 'resi_base_info',
+ dynamic: true
+ })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
// console.log('获取查询详情成功', res.data)
this.searchList = res.data
- res.data.forEach(item => {
+ res.data.forEach((item) => {
if (item.optionSourceType === 'remote') {
- this.getOptionsList(item.optionSourceValue).then(res => {
+ this.getOptionsList(item.optionSourceValue).then((res) => {
item.options = res
})
// console.log('')
@@ -598,30 +673,36 @@ export default {
return this.$message.error('网络错误')
})
},
- async getFormList (type) {
+ async getFormList(type) {
await this.$http
- .post('/oper/customize/icform/getcustomerform', { formCode: 'resi_base_info', dynamic: true })
+ .post('/oper/customize/icform/getcustomerform', {
+ formCode: 'resi_base_info',
+ dynamic: true
+ })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取详情成功getFormList')
- let { itemList, groupList } = res.data
+ let { itemList, groupList, formName } = res.data
+ this.formName = formName
this.activeName = 'group' + res.data.groupList[0].groupId
if (type !== 'edit') {
- itemList.forEach(async item => {
+ itemList.forEach(async (item) => {
if (item.optionSourceType === 'remote') {
- await this.getOptionsList(item.optionSourceValue).then(res => {
- item.options = res
- })
+ await this.getOptionsList(item.optionSourceValue).then(
+ (res) => {
+ item.options = res
+ }
+ )
}
})
}
- groupList.forEach(item => {
- item.itemList.forEach(async n => {
+ groupList.forEach((item) => {
+ item.itemList.forEach(async (n) => {
n.tableName = item.tableName
if (n.optionSourceType === 'remote' && type !== 'edit') {
- await this.getOptionsList(n.optionSourceValue).then(res => {
+ await this.getOptionsList(n.optionSourceValue).then((res) => {
n.options = res
})
}
@@ -652,20 +733,21 @@ export default {
font-weight: 500;
color: #666666;
line-height: 20px;
- background: #EBECF1;
+ background: #ebecf1;
border-radius: 2px;
}
- .el-tabs__nav-wrap::after, .el-tabs__active-bar {
+ .el-tabs__nav-wrap::after,
+ .el-tabs__active-bar {
display: none;
}
- .el-tabs__nav-next, .el-tabs__nav-prev {
+ .el-tabs__nav-next,
+ .el-tabs__nav-prev {
line-height: 20px;
}
-
}
.resi-table {
.el-button--text {
- text-decoration: underline;
+ text-decoration: underline;
}
.btn-color-del {
margin-left: 10px;
@@ -711,5 +793,4 @@ export default {
margin-top: 20px;
text-align: center;
}
-
From 6fa454244ea2b3c56f136dc6ad59d2ea189819cd Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Fri, 5 Nov 2021 16:40:00 +0800
Subject: [PATCH 11/26] 3333
---
src/views/components/resiSearch.vue | 4 ++--
src/views/modules/base/resi.vue | 19 ++++++++++++-------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue
index 925367a1..39c20019 100644
--- a/src/views/components/resiSearch.vue
+++ b/src/views/components/resiSearch.vue
@@ -65,7 +65,7 @@
>
-
-
+ -->
diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue
index fcd7ed4f..b3832659 100644
--- a/src/views/modules/base/resi.vue
+++ b/src/views/modules/base/resi.vue
@@ -578,15 +578,20 @@ export default {
this.editForm[n] = list[n]
}
this.formList.forEach((item) => {
- if (item.childGroup && info[item.childGroup.tableName]) {
- // let _info = info[item.childGroup.tableName]
- // item.childGroup.itemList.forEach(n => {
- // n.columnValue = _info[0][n.columnName]
- // })
- this.tabsList.push(item.childGroup)
- }
item.columnValue = list[item.columnName]
item.ID = list.ID
+
+ if (
+ item.columnValue == '1' &&
+ item.itemType === 'radio' &&
+ item.childGroup
+ ) {
+ this.tabsList.push(item.childGroup)
+ }
+
+ // if (item.childGroup && info[item.childGroup.tableName]) {
+
+ // }
})
this.tabsList.forEach((item) => {
let _info = info[item.tableName]
From 5da1e41c27a57342f33d151cffb22691e9ae6dc1 Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Fri, 5 Nov 2021 16:58:01 +0800
Subject: [PATCH 12/26] =?UTF-8?q?=E9=98=BF=E6=96=AF=E9=A1=BF=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/base/resi.vue | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue
index b3832659..4ca3f937 100644
--- a/src/views/modules/base/resi.vue
+++ b/src/views/modules/base/resi.vue
@@ -443,17 +443,21 @@ export default {
formCode: 'resi_base_info',
icResiUserId: row.icResiUserId
}
+ console.log('row1', row)
this.$http
.post('/epmetuser/icresiuser/delete', params)
.then(({ data: res }) => {
+ console.log('row2', row)
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
+ console.log('row3', row)
this.$message.success('删除成功')
this.getTableData()
}
})
- .catch(() => {
+ .catch((err) => {
+ console.log('row4', err)
return this.$message.error('网络错误')
})
},
From 582ed34615ef110c13d2641c5c3f85f6f1bb03b9 Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Fri, 5 Nov 2021 17:28:50 +0800
Subject: [PATCH 13/26] =?UTF-8?q?=E6=89=93=E5=8F=8D=E9=94=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/base/resi.vue | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue
index 4ca3f937..9f7f2af0 100644
--- a/src/views/modules/base/resi.vue
+++ b/src/views/modules/base/resi.vue
@@ -55,9 +55,31 @@
class="btn-color-edit"
>编辑
+