|
@@ -365,9 +365,9 @@
|
|
|
<el-row>
|
|
|
<!-- 特殊表单 -->
|
|
|
<div v-for="(item, index) in formLP.dynamicItem" :key="index" style="border:1px solid #000;">
|
|
|
- <el-row>
|
|
|
+ <el-row style="margin-top: 10px">
|
|
|
<el-col :span="2" class="col-txt"><span>户型</span></el-col>
|
|
|
- <el-col :span="3" class="col-input">
|
|
|
+ <el-col :span="5" class="col-input">
|
|
|
<el-form-item prop="'dynamicItem.' + index + '.name'">
|
|
|
<el-input
|
|
|
v-model="item.name"
|
|
@@ -376,7 +376,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="3" class="col-input">
|
|
|
+ <el-col :span="5" class="col-input">
|
|
|
<el-form-item prop="'dynamicItem.' + index + '.area'">
|
|
|
<el-input
|
|
|
v-model="item.buildArea"
|
|
@@ -385,7 +385,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="3" class="col-input">
|
|
|
+ <el-col :span="5" class="col-input">
|
|
|
<el-form-item prop="'dynamicItem.' + index + '.area'">
|
|
|
<el-input
|
|
|
v-model="item.useArea"
|
|
@@ -394,12 +394,38 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="2" class="col-txt"><span>*户型图</span></el-col>
|
|
|
+ <el-col :span="3" class="col-input">
|
|
|
+ <el-form-item prop="'dynamicItem.' + index + '.fileList'">
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ action="/server/wx/fileController/uploadImage"
|
|
|
+ :http-request="uploadHouseTypeList"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ multiple
|
|
|
+ :file-list="item.fileList"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ <div slot="file" slot-scope="{file}">
|
|
|
+ <a :href="file.url">{{ file.name }}</a>
|
|
|
+ <span class="el-upload-list__item-actions">
|
|
|
+ <i class="el-icon-delete" @click="handlePictureRemove(file,contractOtherList)" />
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="2" class="col-input">
|
|
|
<el-button v-if="index !== 0" type="danger" size="mini" @click="deleteItem(item, index)">-</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="2" class="col-txt">
|
|
|
+ <el-button size="small" type="text" @click="addItem">+继续添加</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -417,6 +443,8 @@
|
|
|
import Base from '@/views/base/base'
|
|
|
import BaseData from '@/views/base/baseData'
|
|
|
import BaseDept from '@/views/base/baseDept'
|
|
|
+import { upload } from '@/static/utils/channel'
|
|
|
+
|
|
|
import Constant from '@/static/utils/constant'
|
|
|
import common from '@/static/utils/common'
|
|
|
// import textEdit from '../../textEdit/index'
|
|
@@ -432,9 +460,7 @@ export default {
|
|
|
groupName: '',
|
|
|
name: ''
|
|
|
},
|
|
|
- formLP: {
|
|
|
- dynamicItem: {}
|
|
|
- },
|
|
|
+ formLP: this.getBaseForm(),
|
|
|
groupfrom: {},
|
|
|
groupList: [],
|
|
|
DeptTree: [],
|
|
@@ -450,7 +476,6 @@ export default {
|
|
|
currentRow: null,
|
|
|
dialogTitle: '新增用户',
|
|
|
isAdd: true,
|
|
|
- form: this.getBaseForm(),
|
|
|
LeaderData: [],
|
|
|
groupFormRules: {
|
|
|
groupName: [{ required: true, trigger: 'blur', message: '请输入楼盘/小区名称' }],
|
|
@@ -604,7 +629,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleAddFQ: function() {
|
|
|
- this.formLP = {}
|
|
|
+ this.formLP = this.getBaseForm()
|
|
|
this.dialogFQVisible = true
|
|
|
this.dialogTitle = '新增楼盘'
|
|
|
},
|
|
@@ -673,110 +698,21 @@ export default {
|
|
|
})
|
|
|
this.selectId = this.selectId.substring(0, this.selectId.length - 1)
|
|
|
},
|
|
|
-
|
|
|
- // 绑定物业人员
|
|
|
- handleAddWY() {
|
|
|
- if (this.selectId != '' && this.selectId != null && undefined != this.selectId) {
|
|
|
- // this.roleId = "874248305842847744";
|
|
|
- this.handleUserSelect()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: '请先选择管理的楼盘',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 绑定运营人员
|
|
|
- handleAddYY() {
|
|
|
- if (this.selectId != '' && this.selectId != null && undefined != this.selectId) {
|
|
|
- // this.roleId = "874249172914536448";
|
|
|
- this.handleUserSelect()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: '请先选择管理的楼盘',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 批量选择用户
|
|
|
- handleUserSelect: function(val) {
|
|
|
- this.RawUserData = []
|
|
|
- this.selectedIds = []
|
|
|
- this.initStaff().then(() => {
|
|
|
- this.StaffData.forEach(staff => {
|
|
|
- if (staff.status === '1') {
|
|
|
- this.RawUserData.push({
|
|
|
- key: staff.value,
|
|
|
- label: staff.label
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- // 获取绑定过的用户
|
|
|
- this.handleUserByFloor()
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- // 获取绑定过的用户
|
|
|
- handleUserByFloor() {
|
|
|
- const reqData = {
|
|
|
- floorId: this.selectId,
|
|
|
- roleId: this.roleId
|
|
|
- }
|
|
|
- this.baseLPRequest('getUserByFloor', reqData).then((res) => {
|
|
|
- res.data.data.forEach(element => {
|
|
|
- this.selectedIds.push(element.userId)
|
|
|
- })
|
|
|
- this.dialogUserSelect = true
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- confirmUserSelect: function() {
|
|
|
- const reqData = {
|
|
|
- floorId: this.selectId,
|
|
|
- roleId: this.roleId,
|
|
|
- userIds: String(this.selectedIds)
|
|
|
- }
|
|
|
- this.baseLPRequest('bindUserRole', reqData).then((res) => {
|
|
|
- if (res.data.data) {
|
|
|
- this.$message({
|
|
|
- message: '绑定成功',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.getData()
|
|
|
- this.dialogUserSelect = false
|
|
|
- }
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
getItemJson: function(item) {
|
|
|
item.parkType = this.dc_map.parkType[item.parkType]
|
|
|
return item
|
|
|
},
|
|
|
getBaseForm: function() {
|
|
|
const baseForm = {
|
|
|
- id: '',
|
|
|
- groupId: '',
|
|
|
- username: '',
|
|
|
- password: null,
|
|
|
- truename: '',
|
|
|
- leader: '',
|
|
|
- department: [],
|
|
|
- posts: [],
|
|
|
- gender: '',
|
|
|
- phone: '',
|
|
|
- sequenceNo: '',
|
|
|
- secretKey: '',
|
|
|
- comment: ''
|
|
|
- }
|
|
|
-
|
|
|
- if (this.$common.currUser().groupId) {
|
|
|
- baseForm.groupId = this.$common.currUser().groupId
|
|
|
+ dynamicItem: [
|
|
|
+ {
|
|
|
+ fileList: [],
|
|
|
+ name: '',
|
|
|
+ buildArea: '',
|
|
|
+ useArea: ''
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
-
|
|
|
return baseForm
|
|
|
},
|
|
|
|
|
@@ -803,6 +739,25 @@ export default {
|
|
|
dialogClose() {
|
|
|
this.groupfrom = {}
|
|
|
},
|
|
|
+ addItem(length) {
|
|
|
+ console.log('2222', this.formLP)
|
|
|
+ console.log('111', this.formLP.dynamicItem)
|
|
|
+ this.formLP.dynamicItem.push({
|
|
|
+ fileList: [],
|
|
|
+ name: '',
|
|
|
+ buildArea: '',
|
|
|
+ useArea: ''
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 删除方法
|
|
|
+ deleteItem(item, index) {
|
|
|
+ this.formLP.dynamicItem.splice(index, 1)
|
|
|
+ },
|
|
|
+ uploadHouseTypeList: function(param) {
|
|
|
+ upload(param, true).then((res) => {
|
|
|
+ this.formLP.dynamicItem[param].fileList.push(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
// 字典项
|
|
|
generateDcMap: function() {
|
|
|
this.dc_map['dc_gender'] = this.$common.transDcMap(this.dc_gender)
|