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 {
min-height: 100%;
box-sizing: border-box;
padding: 0 25px 50px;
min-height: 100%;
box-sizing: border-box;
padding: 0 25px 50px;
}
.m-title {
display: flex;
align-items: center;
margin-top: 15px;
display: flex;
align-items: center;
margin-top: 15px;
.title_img {
width: 17px;
height: 17px;
}
.tip_title {
margin-left: 8px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 22px;
}
.title_img {
width: 17px;
height: 17px;
}
.tip_title {
margin-left: 8px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 22px;
}
.title_line {
margin-left: 8px;
width: 244px;
height: 1px;
background: linear-gradient(270deg, rgba(55, 198, 255, 0.1) 0%, #1995ff 100%);
}
.title_line {
margin-left: 8px;
width: 244px;
height: 1px;
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 {
margin: 0 10px 0 10px;
::v-deep .el-input {
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 {
width: 180px;
height: 36px;
.el-input__inner {
height: 100%;
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'
// }
}
}
.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 class="pieMain">
<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="content">
<div class="num">{{ item.value }}</div>
@ -63,17 +63,15 @@ export default {
},
handleClickItem(item) {
console.log('dd');
// this.getInfo()
// const { type, name } = item;
// this.$router.push({
// path: '/dataBoard/renfang/resi-analyze',
// query: {
// org_id: this.orgId,
// type,
// type_category: this.currentTab,
// type_name: name
// }
// });
this.getInfo();
const { type, name } = item;
this.$router.push({
path: '/dataBoard/sida/xq/list',
query: {
org_id: this.orgId,
type: this.currentTab
}
});
},
//
async getInfo() {
@ -112,7 +110,7 @@ export default {
this.$message.error(msg);
}
},
pieInitOk() {
this.pieInitState = true;
},
@ -143,5 +141,7 @@ export default {
}
};
</script>
<style>
.cur{cursor: pointer;}
</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-left">
<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" />
<div class="box-title-txt">需求清单</div>
</div>

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

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

Loading…
Cancel
Save