Browse Source

需求列表和弹窗 备个份

V1.0
tianq 3 years ago
parent
commit
8d43c8d428
  1. 96
      src/assets/scss/dataBoard/listBox.scss
  2. 233
      src/views/dataBoard/cpts/need-details.vue
  3. 0
      src/views/dataBoard/cpts/new_file.json
  4. 28
      src/views/dataBoard/sida/cpts/xqqd.vue
  5. 2
      src/views/dataBoard/sida/index.vue
  6. 70
      src/views/dataBoard/sida/xq/list.vue

96
src/assets/scss/dataBoard/listBox.scss

@ -1,57 +1,57 @@
.g-pgi { .g-pgi {
min-height: 100%; min-height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 25px 50px; padding: 0 25px 50px;
} }
.m-title { .m-title {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 15px; margin-top: 15px;
.title_img { .title_img {
width: 17px; width: 17px;
height: 17px; height: 17px;
} }
.tip_title { .tip_title {
margin-left: 8px; margin-left: 8px;
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
line-height: 22px; line-height: 22px;
} }
.title_line { .title_line {
margin-left: 8px; margin-left: 8px;
width: 244px; width: 244px;
height: 1px; height: 1px;
background: linear-gradient(270deg, rgba(55, 198, 255, 0.1) 0%, #1995ff 100%); background: linear-gradient(270deg, rgba(55, 198, 255, 0.1) 0%, #1995ff 100%);
}
} .left10 {
margin-left: 10px;
}
.second-select {
margin: 0 10px 0 10px;
.second-select { ::v-deep .el-input {
margin: 0 10px 0 10px; width: 180px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
background: #06186d;
border: 1px solid #1a64cc;
}
::v-deep .el-input { .el-icon-arrow-up:before {
width: 180px; content: '\e78f';
height: 36px; }
.el-input__inner { // .el-select__caret:before {
height: 100%; // content: '\E790'
padding: 0 10px; // }
color: #fff; }
line-height: 36px; }
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-up:before {
content: "\e78f";
}
// .el-select__caret:before {
// content: '\E790'
// }
}
}
} }

233
src/views/dataBoard/cpts/need-details.vue

@ -0,0 +1,233 @@
<template>
<popup title="需求详情" @close="handleClose">
<template v-slot:cnt>
<div class="m-info" v-if="detailType == '共性需求'">
<div class="row">
<div class="item">
<div class="field">所属网格</div>
<div class="value">{{ info.parent_type_name }}</div>
</div>
<div class="item">
<div class="field">需求类别</div>
<div class="value">{{ info.parent_type_name }} {{ info.child_type_name }}</div>
</div>
<div class="item">
<div class="field">需求标题 </div>
<div class="value">{{ info.title }}</div>
</div>
<div class="item" style="width: 100%;">
<div class="field">详细说明</div>
<div class="value">{{ info.content }}</div>
</div>
<div class="item">
<div class="field">查找有该需求人员 </div>
<div class="value">{{ info.resi_search_tag_name }}</div>
</div>
<div class="item">
<div class="field">服务方 </div>
<div class="value">{{ info.service_name }}</div>
</div>
<div class="item">
<div class="field">服务范围 </div>
<div class="value">{{ info.scope_name }}</div>
</div>
<div class="item">
<div class="field">服务时间</div>
<div class="value">{{ info.start_service_time }}{{ info.end_service_time }}</div>
</div>
</div>
</div>
<div class="m-info" v-if="detailType == '政府支撑'">
<div style="width: 50%;">
<div class="row">
<div class="item">
<div class="field">项目标题</div>
<div class="value">{{ info.title }}</div>
</div>
<div class="item">
<div class="field">项目方案</div>
<div class="value">{{ info.content }}</div>
</div>
<div class="item">
<div class="field">内部备注</div>
<div class="value">{{ info.remark }}</div>
</div>
<div class="item">
<div class="field">当前处理部门</div>
<div class="value">{{ info.department }}</div>
</div>
<div class="item">
<div class="field">分类</div>
<div class="value">{{ info.class }}{{ info.sub_class }}</div>
</div>
<div class="item">
<div class="field">标签</div>
<div class="value">{{ info.label }}</div>
</div>
<div class="item">
<div class="field">操作</div>
<!-- <div class="value">{{ info.report_user_mobile }}</div> -->
</div>
</div>
</div>
<div style="width: 50%;"></div>
</div>
<div class="m-info" v-else>
<div class="row">
<div class="item">
<div class="field">所属网格</div>
<div class="value">{{ info.grid }}</div>
</div>
<div class="item">
<div class="field">需求类型</div>
<div class="value">{{ info.parent_category }} {{ info.category }}</div>
</div>
<div class="item">
<div class="field">上报类型</div>
<div class="value">{{ info.report_type }}</div>
</div>
<div class="item">
<div class="field">上报人</div>
<div class="value">{{ info.report_user_name }}</div>
</div>
<div class="item">
<div class="field">上报时间</div>
<div class="value">{{ info.report_time }}</div>
</div>
<div class="item">
<div class="field">上报人联系电话</div>
<div class="value">{{ info.report_user_mobile }}</div>
</div>
</div>
<div class="row">
<div class="item">
<div class="field">需求人</div>
<div class="value">{{ info.demand_user_name }}</div>
</div>
<div class="item">
<div class="field">服务时间</div>
<div class="value">{{ info.want_service_time }}</div>
</div>
<div class="item">
<div class="field">需求内容</div>
<div class="value">{{ info.content }}</div>
</div>
</div>
<div class="row">
<div class="item">
<div class="field">服务方</div>
<div class="value">{{ info.server_name }}</div>
</div>
<div class="item">
<div class="field">实际服务时间</div>
<div class="value">{{ info.service_start_time }}{{ info.service_end_time }}</div>
</div>
<div class="item">
<div class="field">完成情况</div>
<div class="value">{{ info.finish_result }}</div>
</div>
<div class="item">
<div class="field">评价</div>
<div class="value">{{ info.score }}</div>
</div>
</div>
</div>
</template>
</popup>
</template>
<script>
import popup from '@/views/dataBoard/cpts/popup';
import { requestPostBi } from '@/js/dai/request-bipass';
export default {
name: 'needDetails',
props: {
needId: {
type: String,
default: ''
},
detailType: {
type: String,
default: ''
}
},
components: { popup },
created() {},
data() {
return {
info: {
grid: '--',
parent_category: '--',
category: '--',
report_type: '--',
report_user_name: '--',
report_time: '--',
report_user_mobile: '--',
demand_user_name: '--',
want_service_time: '--',
content: '--',
server_name: '--',
service_start_time: '--',
service_end_time: '--',
finish_result: '--',
score: '--'
}
};
},
mounted() {
this.getApiData();
},
methods: {
handleClose() {
this.$emit('close');
},
async getApiData() {
this.getInfo();
},
// id
async getInfo() {
let url = '';
if (this.detailType == '政府支撑') {
url = 'gov_support';
} else if (this.detailType == '服务支撑') {
url = 'service_support';
} else if (this.detailType == '商家支撑') {
url = 'busi_support';
} else {
url = 'common_support';
}
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
need_id: this.needId
}
},
{
// mockId: 60235478,
}
);
if (code === 0) {
this.info = { ...this.info, ...data[0] };
console.log(this.info);
} else {
this.$message.error(msg);
}
}
}
};
</script>
<style scoped>
.m-info .row .item .field{width: 120px!important;}
</style>
<style lang="scss" src="@/assets/scss/dataBoard/popup-info.scss" scoped></style>

0
src/views/dataBoard/cpts/new_file.json

28
src/views/dataBoard/sida/cpts/xqqd.vue

@ -5,7 +5,7 @@
</div> </div>
<div class="pieMain"> <div class="pieMain">
<div class="legend"> <div class="legend">
<div class="legend-row" :key="'pie' + item.name" v-for="item in pieData" @click="handleClickItem(item)"> <div class="legend-row cur" :key="'pie' + item.name" v-for="item in pieData" @click="handleClickItem(item)">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="content"> <div class="content">
<div class="num">{{ item.value }}</div> <div class="num">{{ item.value }}</div>
@ -63,17 +63,15 @@ export default {
}, },
handleClickItem(item) { handleClickItem(item) {
console.log('dd'); console.log('dd');
// this.getInfo() this.getInfo();
// const { type, name } = item; const { type, name } = item;
// this.$router.push({ this.$router.push({
// path: '/dataBoard/renfang/resi-analyze', path: '/dataBoard/sida/xq/list',
// query: { query: {
// org_id: this.orgId, org_id: this.orgId,
// type, type: this.currentTab
// type_category: this.currentTab, }
// type_name: name });
// }
// });
}, },
// //
async getInfo() { async getInfo() {
@ -112,7 +110,7 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
pieInitOk() { pieInitOk() {
this.pieInitState = true; this.pieInitState = true;
}, },
@ -143,5 +141,7 @@ export default {
} }
}; };
</script> </script>
<style>
.cur{cursor: pointer;}
</style>
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style> <style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style>

2
src/views/dataBoard/sida/index.vue

@ -3,7 +3,7 @@
<div class="g-row"> <div class="g-row">
<div class="g-left"> <div class="g-left">
<div class="m-box"> <div class="m-box">
<div class="box-title" @click="toListPage"> <div class="box-title">
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" /> <img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">需求清单</div> <div class="box-title-txt">需求清单</div>
</div> </div>

70
src/views/dataBoard/sida/xq/list.vue

@ -7,13 +7,29 @@
<div class="tip_title">{{ tableTitle }}</div> <div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div> <div class="title_line"></div>
<div class="second-select" style="position:absolute;margin-left:300px;"> <div class="second-select" style="position:absolute;margin-left:300px;">
<el-select v-model="type1" @change="getList" :clearable="true"><el-option value="个性需求">个性需求</el-option></el-select> <el-select v-model="listType" @change="changList">
&nbsp; <el-option value="个性需求">个性需求</el-option>
<el-select v-model="type2" @change="getList" :clearable="true"> <el-option value="共性需求">共性需求</el-option>
<el-option value="政府支撑">政府支撑</el-option> </el-select>
<el-option value="社会保障">社会保障</el-option>
<el-option value="社区环境">社区环境</el-option> <el-select v-model="type2" @change="getList" :clearable="true" class="left10">
<el-option value="商家支撑">商家支撑</el-option> <el-option value="全部">全部</el-option>
<template v-if="listType == '个性需求'">
<el-option value="商家支撑">商家支撑</el-option>
<el-option value="服务支撑">服务支撑</el-option>
<el-option value="政府支撑">政府支撑</el-option>
</template>
<template v-if="listType == '共性需求'">
<el-option value="社区养老">社区养老</el-option>
<el-option value="社会保障">社会保障</el-option>
<el-option value="社区救助">社区救助</el-option>
<el-option value="健康医疗">健康医疗</el-option>
<el-option value="社区安全">社区安全</el-option>
<el-option value="社区卫生">社区卫生</el-option>
<el-option value="社区环境">社区环境</el-option>
<el-option value="社区治安">社区治安</el-option>
<el-option value="社区文化">社区文化</el-option>
</template>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -28,28 +44,31 @@
@operate="showInfo" @operate="showInfo"
></cpt-tb> ></cpt-tb>
<house-details @close="displayedHouseId = ''" :house-id="displayedHouseId" v-if="displayedHouseId" /> <needDetails @close="displayedId = ''" :needId="displayedId" :detailType="detailType" v-if="displayedId != ''" />
</div> </div>
</template> </template>
<script> <script>
import cptTb from '@/views/dataBoard/cpts/tb'; import cptTb from '@/views/dataBoard/cpts/tb';
import cptBread from '@/views/dataBoard/renfang/cpts/bread'; import cptBread from '@/views/dataBoard/renfang/cpts/bread';
import houseDetails from '@/views/dataBoard/cpts/house-details'; import needDetails from '@/views/dataBoard/cpts/need-details';
import { requestPostBi } from '@/js/dai/request-bipass'; import { requestPostBi } from '@/js/dai/request-bipass';
import getQueryPara from 'dai-js/modules/getQueryPara'; import getQueryPara from 'dai-js/modules/getQueryPara';
export default { export default {
name: 'house-list', name: 'need-list',
components: { components: {
cptTb, cptTb,
cptBread, cptBread,
houseDetails needDetails
}, },
data() { data() {
return { return {
displayedId: '',
detailType: '',
breadList: [ breadList: [
{ {
type: 'back', type: 'back',
@ -64,7 +83,7 @@ export default {
} }
], ],
type1: '', type1: '',
type2: '', type2: '全部',
tableTitle: '需求列表', tableTitle: '需求列表',
searchName: '', searchName: '',
@ -107,24 +126,26 @@ export default {
} }
], ],
header: ['序号', '需求类型', '需求内容', '状态', '上报时间', '操作'], header: ['序号', '需求类型', '需求内容', '状态', '上报时间', '操作']
displayedHouseId: ''
}; };
}, },
activated() { activated() {
this.org_id = getQueryPara('org_id'); this.org_id = getQueryPara('org_id');
this.listType = getQueryPara('type'); this.listType = getQueryPara('type');
const type_name = getQueryPara('type_name'); // const type_name = getQueryPara('type_name');
this.breadList[1].meta.title = type_name + '需求列表'; // this.breadList[1].meta.title = type_name + '';
this.tableTitle = type_name + '需求列表'; // this.tableTitle = type_name + '';
this.pageNo = 1; this.pageNo = 1;
this.getList(); this.getList();
// this.getCount(); this.getCount();
}, },
methods: { methods: {
changList() {
this.type2 = '全部';
this.getList();
},
handleClickBreadItem({ item }) { handleClickBreadItem({ item }) {
if (item.type == 'back') { if (item.type == 'back') {
this.$router.back(); this.$router.back();
@ -135,7 +156,9 @@ export default {
showInfo(index) { showInfo(index) {
let item = this.srcTableData[index]; let item = this.srcTableData[index];
this.displayedHouseId = item.house_id;
this.detailType = item.need_type;
this.displayedId = item.need_id;
}, },
handlePageNoChange(pageNo) { handlePageNoChange(pageNo) {
@ -152,9 +175,7 @@ export default {
async getList() { async getList() {
const { org_id, listType, pageNo, pageSize } = this; const { org_id, listType, pageNo, pageSize } = this;
this.loading = true; this.loading = true;
const url = 'need_list'; const url = 'need_list';
console.log('pageNo', pageNo);
const { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPostBi(
url, url,
{ {
@ -174,7 +195,7 @@ export default {
if (code === 0) { if (code === 0) {
this.srcTableData = data; this.srcTableData = data;
console.log('this.srcTableData ', this.srcTableData);
// this.total = data.total; // this.total = data.total;
this.list = data.map((item, index) => { this.list = data.map((item, index) => {
@ -202,8 +223,7 @@ export default {
{ type: 'operate', list: ['查看'] } { type: 'operate', list: ['查看'] }
]; ];
}); });
console.log('this.list', this.list); // console.log('this.list', this.list);
this.total = this.list.length;
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

Loading…
Cancel
Save