Browse Source

合并songzhen分支代码

V1.0
PLUTO 2 years ago
parent
commit
f3030fba5e
  1. 23
      src/views/dataBoard/overview/components/DynamicHumanRoomData.vue
  2. 2
      src/views/dataBoard/overview/index.vue
  3. 210
      src/views/dataBoard/satisfactionEval/dissatisfied/index.vue

23
src/views/dataBoard/overview/components/DynamicHumanRoomData.vue

@ -15,14 +15,11 @@
<div ref="animation2"> <div ref="animation2">
<div class="dhrd-item" v-for="(item, index) in list" :key="index"> <div class="dhrd-item" v-for="(item, index) in list" :key="index">
<div class="time"> <div class="time">
{{ $moment(item.changeTime).format("HH:mm") }} {{ getMomentTime(item.changeTime) }}
<!-- {{ $moment(item.changeTime).format("HH:mm") }} -->
</div> </div>
<div class="title"> <div class="title">
<el-tooltip <el-tooltip class="item" effect="dark" :content="item.orgName" placement="top"
class="item"
effect="dark"
:content="item.orgName"
placement="top"
><span>{{ item.orgName }}</span> ><span>{{ item.orgName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
@ -35,11 +32,7 @@
{{ $moment(item.changeTime).format("HH:mm") }} {{ $moment(item.changeTime).format("HH:mm") }}
</div> </div>
<div class="title"> <div class="title">
<el-tooltip <el-tooltip class="item" effect="dark" :content="item.orgName" placement="top"
class="item"
effect="dark"
:content="item.orgName"
placement="top"
><span>{{ item.orgName }}</span> ><span>{{ item.orgName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
@ -105,6 +98,14 @@ export default {
} }
}); });
}, },
getMomentTime(date) {
if (this.$moment(date).format("YYYY-MM-DD") === this.$moment().format("YYYY-MM-DD")) {
return this.$moment(date).format("HH:mm");
} else {
return this.$moment(date).format("MM-DD");
}
},
}, },
}; };
</script> </script>

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

@ -89,7 +89,7 @@
</div> </div>
<!-- 网格 --> <!-- 网格 -->
<div v-if="currentLevel === 'grid'" class="m-box"> <div v-if="currentLevel === 'grid'" class="m-box">
<title-box text="社区网格数据更新情况排行"> <title-box text="社区网格数据更新排行">
<span class="date-span"> <span class="date-span">
<el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="sqwggxDate" format="yyyy-MM" value-format="yyyy-MM" @change="changeDate" type="month" :clearable="false" placeholder="选择月" /> <el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="sqwggxDate" format="yyyy-MM" value-format="yyyy-MM" @change="changeDate" type="month" :clearable="false" placeholder="选择月" />
</span> </span>

210
src/views/dataBoard/satisfactionEval/dissatisfied/index.vue

@ -3,93 +3,27 @@
<Breadcrumb :list="breadcrumbList" /> <Breadcrumb :list="breadcrumbList" />
<div class="screen"> <div class="screen">
<el-form :model="queryParams" inline> <el-form :model="queryParams" inline>
<el-date-picker <el-date-picker v-if="!hideSearch" size="small" popper-class="date-current-weiyi" :append-to-body="false" v-model="queryParams.month" type="month" value-format="yyyy-MM" placeholder="按月度"> </el-date-picker>
v-if="!hideSearch"
size="small" <el-select v-if="!hideSearch" popper-class="selectPopClass" v-model="queryParams.agencyId" size="small" placeholder="按组织">
popper-class="date-current-weiyi" <el-option v-for="item in orgOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
:append-to-body="false"
v-model="queryParams.month"
type="month"
value-format="yyyy-MM"
placeholder="按月度"
>
</el-date-picker>
<el-select
v-if="!hideSearch"
popper-class="selectPopClass"
v-model="queryParams.agencyId"
size="small"
placeholder="按组织"
>
<el-option
v-for="item in orgOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-select>
<el-select <el-select class="searchSelect" popper-class="selectPopClass" clearable collapse-tags multiple v-model="queryParams.satisfactionSource" size="small" placeholder="按不满意事项来源" @change="getSatisfactionCategoryOptions">
class="searchSelect" <el-option v-for="item in satisfactionSourceOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
popper-class="selectPopClass"
clearable
collapse-tags
multiple
v-model="queryParams.satisfactionSource"
size="small"
placeholder="按不满意事项来源"
@change="getSatisfactionCategoryOptions"
>
<el-option
v-for="item in satisfactionSourceOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-select>
<el-select <el-select popper-class="selectPopClass" clearable v-model="queryParams.satisfactionCategory" size="small" placeholder="按不满意事项类型">
popper-class="selectPopClass" <el-option v-for="item in satisfactionCategoryOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
clearable
v-model="queryParams.satisfactionCategory"
size="small"
placeholder="按不满意事项类型"
>
<el-option
v-for="item in satisfactionCategoryOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> </el-select>
<el-input <el-input v-model.trim="queryParams.name" size="small" placeholder="按人员姓名"></el-input>
v-model.trim="queryParams.name" <el-input v-model.trim="queryParams.mobile" size="small" placeholder="按人员电话"></el-input>
size="small" <el-button size="small" class="btn" type="primary" @click="search">查询</el-button>
placeholder="按人员姓名"
></el-input>
<el-input
v-model.trim="queryParams.mobile"
size="small"
placeholder="按人员电话"
></el-input>
<el-button size="small" class="btn" type="primary" @click="search"
>查询</el-button
>
</el-form> </el-form>
</div> </div>
<div class="table"> <div class="table">
<el-table <el-table :data="list" v-loading="loading" element-loading-text="加载中..." element-loading-spinner="el-icon-loading" element-loading-background="rgba(0,0,0,0.5)">
:data="list"
v-loading="loading"
element-loading-text="加载中..."
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0,0,0,0.5)"
>
<el-table-column label="序号" type="index" width="80" /> <el-table-column label="序号" type="index" width="80" />
<el-table-column prop="month" label="月度" width="114" /> <el-table-column prop="month" label="月度" width="114" />
@ -101,18 +35,13 @@
<span <span
:style="{ :style="{
color: satisfactionSourceFormat(row.satisfactionSource).color, color: satisfactionSourceFormat(row.satisfactionSource).color,
}" }">
>
{{ satisfactionSourceFormat(row.satisfactionSource).label }} {{ satisfactionSourceFormat(row.satisfactionSource).label }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="satisfactionCategoryName" width="150" label="事项类型" />
prop="satisfactionCategoryName"
width="150"
label="事项类型"
/>
<el-table-column prop="reason" show-overflow-tooltip label="事项描述" /> <el-table-column prop="reason" show-overflow-tooltip label="事项描述" />
@ -148,21 +77,13 @@
<el-table-column label="操作" width="90" align="center"> <el-table-column label="操作" width="90" align="center">
<template slot-scope="data"> <template slot-scope="data">
<el-button type="text" @click="handleView(data.row)" <el-button type="text" @click="handleView(data.row)">查看</el-button>
>查看</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<Pagination <Pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<DissatisfiedDetail ref="detail" :id="id" /> <DissatisfiedDetail ref="detail" :id="id" />
</div> </div>
</template> </template>
@ -179,7 +100,7 @@ export default {
return { return {
hideSearch: false, hideSearch: false,
queryParams: { queryParams: {
month: this.$moment().format("YYYY-MM"), month: "",
agencyId: "", agencyId: "",
satisfactionSource: [], satisfactionSource: [],
satisfactionCategory: "", satisfactionCategory: "",
@ -259,26 +180,18 @@ export default {
return; return;
} }
const satisfactionSource = this.queryParams.satisfactionSource.toString(); const satisfactionSource = this.queryParams.satisfactionSource.toString();
this.$http this.$http.get("/governance/satisfactionDetailList/getUnsatisfiedCategory?satisfactionSource=" + satisfactionSource).then(({ data: { data } }) => {
.get( this.satisfactionCategoryOptions = data.map((item) => {
"/governance/satisfactionDetailList/getUnsatisfiedCategory?satisfactionSource=" + return {
satisfactionSource label: item.categoryName,
) value: item.categoryCode,
.then(({ data: { data } }) => { };
this.satisfactionCategoryOptions = data.map((item) => {
return {
label: item.categoryName,
value: item.categoryCode,
};
});
this.queryParams.satisfactionCategory =
this.$route.params.type == 0 ? "" : this.$route.params.type;
}); });
this.queryParams.satisfactionCategory = this.$route.params.type == 0 ? "" : this.$route.params.type;
});
}, },
satisfactionSourceFormat(val) { satisfactionSourceFormat(val) {
let satisfactionSource = this.satisfactionSourceOptions.filter( let satisfactionSource = this.satisfactionSourceOptions.filter((item) => item.value === val)[0];
(item) => item.value === val
)[0];
return satisfactionSource ? satisfactionSource : ""; return satisfactionSource ? satisfactionSource : "";
}, },
search() { search() {
@ -287,39 +200,31 @@ export default {
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.$http this.$http.get("/governance/satisfactionDetailList/getUnsatisfiedMattersList?" + this.$paramsFormat(this.queryParams)).then(({ data: { data } }) => {
.get( this.total = data.total;
"/governance/satisfactionDetailList/getUnsatisfiedMattersList?" + this.list = data.list;
this.$paramsFormat(this.queryParams) this.loading = false;
) });
.then(({ data: { data } }) => {
this.total = data.total;
this.list = data.list;
this.loading = false;
});
}, },
getOrg() { getOrg() {
let params = { let params = {
orgId: this.$store.state.chooseArea.chooseName.orgId, orgId: this.$store.state.chooseArea.chooseName.orgId,
level: this.$store.state.chooseArea.chooseName.level, level: this.$store.state.chooseArea.chooseName.level,
}; };
this.$http this.$http.post(`/gov/org/agency/maporg`, params).then(async ({ data: { data } }) => {
.post(`/gov/org/agency/maporg`, params) this.queryParams.agencyId = this.$store.state.chooseArea.chooseName.orgId;
.then(async ({ data: { data } }) => { let parent = { value: data.id, label: data.name };
this.queryParams.agencyId = this.orgOptions = [
this.$store.state.chooseArea.chooseName.orgId; parent,
let parent = { value: data.id, label: data.name }; ...data.children.map((item) => {
this.orgOptions = [ return {
parent, value: item.id,
...data.children.map((item) => { label: item.name,
return { };
value: item.id, }),
label: item.name, ];
}; this.getList();
}), });
];
this.getList();
});
}, },
timeChange(type) { timeChange(type) {
let startTime = "", let startTime = "",
@ -328,35 +233,20 @@ export default {
startTime = this.$moment().startOf("month").format("YYYY-MM-DD"); startTime = this.$moment().startOf("month").format("YYYY-MM-DD");
} }
if (type == 2) { if (type == 2) {
startTime = this.$moment() startTime = this.$moment().subtract(1, "months").startOf("month").format("YYYY-MM-DD");
.subtract(1, "months")
.startOf("month")
.format("YYYY-MM-DD");
} }
if (type == 3) { if (type == 3) {
startTime = this.$moment() startTime = this.$moment().subtract(2, "months").startOf("month").format("YYYY-MM-DD");
.subtract(2, "months")
.startOf("month")
.format("YYYY-MM-DD");
} }
if (type == 4) { if (type == 4) {
startTime = this.$moment() startTime = this.$moment().subtract(5, "months").startOf("month").format("YYYY-MM-DD");
.subtract(5, "months")
.startOf("month")
.format("YYYY-MM-DD");
} }
if (type == 5) { if (type == 5) {
startTime = this.$moment() startTime = this.$moment().subtract(11, "months").startOf("month").format("YYYY-MM-DD");
.subtract(11, "months")
.startOf("month")
.format("YYYY-MM-DD");
} }
if (type == 2) { if (type == 2) {
endTime = this.$moment() endTime = this.$moment().subtract(1, "months").endOf("month").format("YYYY-MM-DD");
.subtract(1, "months")
.endOf("month")
.format("YYYY-MM-DD");
} else { } else {
endTime = this.$moment().endOf("month").format("YYYY-MM-DD"); endTime = this.$moment().endOf("month").format("YYYY-MM-DD");
} }

Loading…
Cancel
Save