Browse Source

Merge branch 'dev-caiji' into shibei_master

shibei_master
jiangyy 3 years ago
parent
commit
b9ef179c77
  1. 14
      src/assets/scss/buttonstyle.scss
  2. 6
      src/assets/scss/pages/caiji.scss
  3. 43
      src/views/modules/base/community/communityTable.vue
  4. 101
      src/views/pages/caiji.vue

14
src/assets/scss/buttonstyle.scss

@ -81,12 +81,16 @@
background-color: #3e8ef7 !important; background-color: #3e8ef7 !important;
border-color: #3e8ef7 !important; border-color: #3e8ef7 !important;
} }
.diy-button--qrcode {
color: #fff !important;
background-color: #4ec591 !important;
border-color: #4ec591 !important;
}
//table按钮样式 //table按钮样式
//查看 //查看
.div-table-button--detail { .div-table-button--detail {
color: #3E8EF7 !important; color: #3e8ef7 !important;
text-decoration: underline !important; text-decoration: underline !important;
} }
@ -101,3 +105,9 @@
color: #d51010 !important; color: #d51010 !important;
text-decoration: underline !important; text-decoration: underline !important;
} }
//
.div-table-button--qr {
color: #4ec591 !important;
text-decoration: underline !important;
}

6
src/assets/scss/pages/caiji.scss

@ -1,5 +1,5 @@
.bg-app { .bg-app {
background-color: rgba(218, 218, 218, 0.89); background-color: rgba(189, 214, 255, 0.89);
height: 100%; height: 100%;
width: 100vw; width: 100vw;
padding: 20px; padding: 20px;
@ -37,6 +37,10 @@
padding-bottom: 20px; padding-bottom: 20px;
display: flex; display: flex;
justify-content: center; justify-content: center;
.btn {
width: 100px;
}
} }
} }

43
src/views/modules/base/community/communityTable.vue

@ -33,6 +33,10 @@
class="diy-button--reset" class="diy-button--reset"
size="small" size="small"
@click="resetSearch">重置</el-button> @click="resetSearch">重置</el-button>
<!-- <el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button> -->
</div> </div>
<div class="div_btn"> <div class="div_btn">
<el-button style="" <el-button style=""
@ -99,6 +103,11 @@
class="diy-button--reset" class="diy-button--reset"
size="small" size="small"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
<el-button v-if="agencyObj.level == 'community'"
style="margin-left:10px"
class="diy-button--qrcode"
size="small"
@click="handleDownQr(agencyObj, 'community')">社区二维码</el-button>
</div> </div>
@ -119,6 +128,11 @@
<el-table-column prop="neighborHoodName" <el-table-column prop="neighborHoodName"
label="小区名称" label="小区名称"
min-width="100"> min-width="100">
<!-- <template slot-scope="scope">
<a class="name-a" @click="handleDetail(scope.row)">
{{ scope.row.neighborHoodName }}
</a>
</template> -->
</el-table-column> </el-table-column>
<el-table-column prop="agencyName" <el-table-column prop="agencyName"
label="所属组织" label="所属组织"
@ -156,6 +170,10 @@
style="color:#feb349;text-decoration: underline;" style="color:#feb349;text-decoration: underline;"
size="small" size="small"
@click="handleToNextLevel(scope.row)">进入</el-button> --> @click="handleToNextLevel(scope.row)">进入</el-button> -->
<!-- <el-button type="text"
class="div-table-button--qr"
size="small"
@click="handleDownQr(scope.row, 'neighborHood')">二维码</el-button> -->
<el-button type="text" <el-button type="text"
class="div-table-button--detail" class="div-table-button--detail"
size="small" size="small"
@ -223,6 +241,7 @@ import CommunityForm from './communityForm'
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading import { Loading } from 'element-ui' // Loading
import axios from 'axios'
let loading // let loading //
export default { export default {
@ -528,7 +547,29 @@ export default {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
async handleDownQr (row, type) {
// const url = window.SITE_CONFIG['apiURL'] + `/gov/org/icneighborhood/createQrCode/${row.neighborHoodId}`
const url = '/gov/org/agency/create-qrcode'
const _id = type == 'community' ? row.id : row.neighborHoodId
const params = {
id: _id,
type
}
await axios({
method: 'POST',
url: window.SITE_CONFIG['apiURL'] + url,
data: params,
responseType: 'blob'
}).then(res => {
console.log('res----1r', res)
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
this.download(res.data, fileName) //blob
} else this.$message.error('下载失败')
// this.download(res.data, '1.png')
})
},
// //
async handleExport () { async handleExport () {
let title = this.agencyObj.label let title = this.agencyObj.label

101
src/views/pages/caiji.vue

@ -75,7 +75,7 @@
<mt-field class="my-field" <mt-field class="my-field"
:disableClear="true" :disableClear="true"
label="详细地址" label="详细地址"
placeholder="请输入" placeholder="xx小区(号)x号楼x单元x户"
v-model="formData.address"></mt-field> v-model="formData.address"></mt-field>
<div class="line"></div> <div class="line"></div>
</div> </div>
@ -99,14 +99,23 @@
v-model="formData.houseHolderName"></mt-field> v-model="formData.houseHolderName"></mt-field>
<div class="line"></div> <div class="line"></div>
<mt-field class="my-field" <div @click="handelSel('totalResi')">
<mt-cell :title="'居住成员人数'"
is-link>
<span class="picker_content"
v-if="selTotalResi">{{selTotalResi.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<!-- <mt-field class="my-field"
label="居住成员人数" label="居住成员人数"
:disableClear="true" :disableClear="true"
placeholder="请输入" placeholder="请输入"
type="number" type="number"
@blur.native.capture="bluraa" @blur.native.capture="bluraa"
v-model="formData.totalResi"></mt-field> v-model="formData.totalResi"></mt-field>
<div class="line"></div> <div class="line"></div> -->
</div> </div>
@ -162,6 +171,7 @@
<div class="div-btn"> <div class="div-btn">
<mt-button @click="handleSubmit" <mt-button @click="handleSubmit"
type="primary" type="primary"
class="btn"
:disabled="btnDisabled" :disabled="btnDisabled"
size="small">提交</mt-button> size="small">提交</mt-button>
</div> </div>
@ -217,6 +227,10 @@ export default {
selUnit: null, selUnit: null,
selHome: null, selHome: null,
selHomeType: null, selHomeType: null,
selTotalResi: {
label: '4人',
value: 4
},
unitContent: '', unitContent: '',
homeContent: '',//// homeContent: '',////
@ -229,7 +243,7 @@ export default {
address: '',//绿10101 address: '',//绿10101
houseType: '',//10 houseType: '',//10
houseHolderName: '',// houseHolderName: '',//
totalResi: 1,// totalResi: 4,//
customerId: '',//customerId customerId: '',//customerId
}, },
@ -246,7 +260,8 @@ export default {
ymjz: '', ymjz: '',
selDetNum: {}, selDetNum: {},
selDetCondition: {} selDetCondition: {}
} },
], ],
roomTypeList: [ roomTypeList: [
@ -259,7 +274,7 @@ export default {
label: '租住' label: '租住'
}, },
], ],
totalResiList: [],
detNumList: [],//list detNumList: [],//list
detConditionList: [//list detConditionList: [//list
{ {
@ -325,37 +340,21 @@ export default {
} }
this.detNumList.push(obj) this.detNumList.push(obj)
} }
},
methods: { for (let i = 1; i < 9; i++) {
bluraa () { let obj = {
let objTemp = { value: i,
name: '', label: i + '人',
mobile: '',
idNum: '',
heSuanCount: 0,
ymjz: '',
selDetNum: {},
customerId: '',
selDetCondition: {}
}
if (this.memberList.length > this.formData.totalResi) {//
let differ = this.memberList.length - this.formData.totalResi
this.memberList.splice(this.formData.totalResi, differ)
} else if (this.memberList.length < this.formData.totalResi) {////
let differ = this.formData.totalResi - this.memberList.length
for (let i = 0; i < differ; i++) {
let temp = JSON.parse(JSON.stringify(objTemp))
this.memberList.push(temp)
} }
this.totalResiList.push(obj)
} }
this.bluraa()
console.log(this.memberList)
}, },
methods: {
//id //id
async loadVillage () { async loadVillage () {
const url = "/gov/org/icneighborhood/open/list" const url = "/gov/org/icneighborhood/open/list"
@ -527,6 +526,9 @@ export default {
} }
if (selType === 'totalResi') {
this.pickerData = this.totalResiList
}
if (selType === 'roomType') { if (selType === 'roomType') {
this.pickerData = this.roomTypeList this.pickerData = this.roomTypeList
} }
@ -694,9 +696,6 @@ export default {
popupOk () { popupOk () {
if (this.selType === 'community') { if (this.selType === 'community') {
this.selVillage = this.selObj this.selVillage = this.selObj
this.selBuild = null this.selBuild = null
this.selUnit = null this.selUnit = null
this.selHome = null this.selHome = null
@ -729,9 +728,13 @@ export default {
} }
if (this.selType === 'room') { if (this.selType === 'room') {
this.selHome = this.selObj this.selHome = this.selObj
this.homeContent = '' this.homeContent = ''
}
if (this.selType === 'totalResi') {
this.selTotalResi = this.selObj
this.formData.totalResi = this.selObj.value
this.bluraa()
} }
if (this.selType === 'roomType') { if (this.selType === 'roomType') {
@ -755,6 +758,34 @@ export default {
}, },
bluraa () {
let objTemp = {
name: '',
mobile: '',
idNum: '',
heSuanCount: 0,
ymjz: '',
selDetNum: {},
customerId: '',
selDetCondition: {}
}
if (this.memberList.length > this.formData.totalResi) {//
let differ = this.memberList.length - this.formData.totalResi
this.memberList.splice(this.formData.totalResi, differ)
} else if (this.memberList.length < this.formData.totalResi) {////
let differ = this.formData.totalResi - this.memberList.length
for (let i = 0; i < differ; i++) {
let temp = JSON.parse(JSON.stringify(objTemp))
this.memberList.push(temp)
}
}
console.log(this.memberList)
},
onPickerChange (picker, values) { onPickerChange (picker, values) {
this.selObj = values[0] this.selObj = values[0]

Loading…
Cancel
Save