Browse Source

Merge remote-tracking branch 'origin/master'

master_tdsql
zth 9 months ago
parent
commit
ee3cce9c7a
  1. 22
      src/components/linkNameSelect/linkDike.vue
  2. 10
      src/components/linkNameSelect/linkSluice.vue
  3. 16
      src/layout/components/Sidebar/index.vue
  4. 31
      src/views/dike/safetyManage/declarationManage/declare/components/dataCharts.vue
  5. 1
      src/views/dike/safetyManage/declarationManage/declare/components/listPage/options/basePage.vue
  6. 29
      src/views/dike/safetyManage/declarationManage/examine/components/dataCharts.vue
  7. 2
      src/views/dike/safetyManage/safetyAppraisal/task.vue
  8. 29
      src/views/sluice/safetyManage/declarationManage/declare/components/dataCharts.vue
  9. 29
      src/views/sluice/safetyManage/declarationManage/examine/components/dataCharts.vue
  10. 2
      src/views/sluice/safetyManage/safetyAppraisal/task.vue

22
src/components/linkNameSelect/linkDike.vue

@ -30,12 +30,14 @@
style="width: 100%" style="width: 100%"
v-scroll="selectSearch" v-scroll="selectSearch"
filterable filterable
:filter-method="aaaa"
clearable clearable
remote remote
reserve-keyword reserve-keyword
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@change="handleChange" @change="handleChange"
@blur="handleChange"
> >
<el-option <el-option
v-for="dict in dikeNameOptions" v-for="dict in dikeNameOptions"
@ -79,11 +81,15 @@ export default {
this.dikeNameQueryParams.data.dikeName = this.form.dikeName; this.dikeNameQueryParams.data.dikeName = this.form.dikeName;
} }
listJbxx(this.dikeNameQueryParams).then((res) => { listJbxx(this.dikeNameQueryParams).then((res) => {
// console.log(111, res); console.log(111, res);
this.dikeNameOptions = res.records; this.dikeNameOptions = res.records;
}); });
}, },
methods: { methods: {
aaaa(value) {
console.log(999);
return true;
},
reset() { reset() {
this.dikeNameQueryParams = { this.dikeNameQueryParams = {
pageNum: 1, pageNum: 1,
@ -103,24 +109,28 @@ export default {
}; };
}, },
handleChange(keyWork) { handleChange(keyWork) {
console.log(1111, this.form); // console.log(1111, this.form);
if (!keyWork) { // if (!keyWork) {
this.reset(); this.reset();
listJbxx(this.dikeNameQueryParams).then((res) => { listJbxx(this.dikeNameQueryParams).then((res) => {
this.dikeNameOptions = res.records; this.dikeNameOptions = res.records;
}); });
} // }else{
// }
}, },
remoteMethod(query) { remoteMethod(query) {
if (query !== "") {
this.selectLoading = true; this.selectLoading = true;
if (query !== "") {
// console.log(444, query); // console.log(444, query);
this.dikeNameQueryParams.data.dikeName = query; this.dikeNameQueryParams.data.dikeName = query;
} else {
this.reset();
}
listJbxx(this.dikeNameQueryParams).then((res) => { listJbxx(this.dikeNameQueryParams).then((res) => {
this.dikeNameOptions = res.records; this.dikeNameOptions = res.records;
this.selectLoading = false; this.selectLoading = false;
}); });
}
}, },
selectSearch() { selectSearch() {
this.dikeNameQueryParams.pageNum += 1; this.dikeNameQueryParams.pageNum += 1;

10
src/components/linkNameSelect/linkSluice.vue

@ -119,23 +119,25 @@ export default {
}; };
}, },
handleChange(keyWork) { handleChange(keyWork) {
if (!keyWork) { // if (!keyWork) {
this.reset(); this.reset();
listJbxx(this.wagaNameQueryParams).then((res) => { listJbxx(this.wagaNameQueryParams).then((res) => {
this.wagaNameOptions = res.records; this.wagaNameOptions = res.records;
}); });
} // }/
}, },
remoteMethod(query) { remoteMethod(query) {
if (query !== "") {
this.selectLoading = true; this.selectLoading = true;
if (query !== "") {
// console.log(444, query); // console.log(444, query);
this.wagaNameQueryParams.data.wagaName = query; this.wagaNameQueryParams.data.wagaName = query;
} else {
this.reset();
}
listJbxx(this.wagaNameQueryParams).then((res) => { listJbxx(this.wagaNameQueryParams).then((res) => {
this.wagaNameOptions = res.records; this.wagaNameOptions = res.records;
this.selectLoading = false; this.selectLoading = false;
}); });
}
}, },
selectSearch() { selectSearch() {
this.wagaNameQueryParams.pageNum += 1; this.wagaNameQueryParams.pageNum += 1;

16
src/layout/components/Sidebar/index.vue

@ -47,11 +47,25 @@ export default {
activeMenu() { activeMenu() {
const route = this.$route; const route = this.$route;
const { meta, path } = route; const { meta, path } = route;
let newPath = path;
if (path.includes("/sluice/engineeringCondition/sluiceBaseInfo/")) {
newPath = "/sluice/engineeringCondition/sluiceBaseInfo";
} else if (path.includes("/sluice/safetyManage/declare/")) {
newPath = "/sluice/safetyManage/declare";
} else if (path.includes("/sluice/safetyManage/examine/")) {
newPath = "/sluice/safetyManage/examine";
} else if (path.includes("/dike/engineeringCondition/dikeBaseInfo/")) {
newPath = "/dike/engineeringCondition/dikeBaseInfo";
} else if (path.includes("/dike/safetyManage/declare/")) {
newPath = "/dike/safetyManage/declare";
} else if (path.includes("/dike/safetyManage/examine/")) {
newPath = "/dike/safetyManage/examine";
}
// if set path, the sidebar will highlight the path you set // if set path, the sidebar will highlight the path you set
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu; return meta.activeMenu;
} }
return path; return newPath;
}, },
showLogo() { showLogo() {
return this.$store.state.settings.sidebarLogo; return this.$store.state.settings.sidebarLogo;

31
src/views/dike/safetyManage/declarationManage/declare/components/dataCharts.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="content"> <div class="content" v-loading="loading">
<div ref="pieEle" style="width: 30%; height: 100%"></div> <div ref="pieEle" style="width: 30%; height: 100%"></div>
<div ref="barEle" style="width: 70%; height: 100%"></div> <div ref="barEle" style="width: 70%; height: 100%"></div>
</div> </div>
@ -11,7 +11,9 @@ export default {
data() { data() {
return { return {
pieChartData: [], pieChartData: [],
selected: {},
barChartData: [], barChartData: [],
loading: true,
}; };
}, },
created() { created() {
@ -19,18 +21,29 @@ export default {
}, },
methods: { methods: {
async getData() { async getData() {
this.loading = true;
const res1 = await getPie(); const res1 = await getPie();
const res2 = await getHistogram(); const res2 = await getHistogram();
this.pieChartData = []; this.pieChartData = [];
for (let key in res1[0]) { for (let key in res1[0]) {
this.pieChartData.push({ value: res1[0][key], name: key }); this.pieChartData.push({
value: res1[0][key],
name: key?.substring(0, 10),
});
}
//
for (let i = 0; i < this.pieChartData.length; i++) {
let name = this.pieChartData[i].name;
this.selected[name] = i < 7; //10 name
} }
// for (let key in res1[0]) { // for (let key in res1[0]) {
// this.barChartData.push({ value: res1[0][key], name: key }); // this.barChartData.push({ value: res1[0][key], name: key });
// } // }
this.barChartData = res2; this.barChartData = res2;
this.pieInit(); this.pieInit();
this.barInit(); this.barInit();
this.loading = false;
console.log("pieChartData", this.pieChartData); console.log("pieChartData", this.pieChartData);
console.log("barChartData", this.barChartData); console.log("barChartData", this.barChartData);
}, },
@ -51,6 +64,8 @@ export default {
orient: "horizontal", orient: "horizontal",
bottom: "2%", bottom: "2%",
icon: "circle", icon: "circle",
type: "scroll",
selected: this.selected,
}, },
series: [ series: [
{ {
@ -106,6 +121,18 @@ export default {
bottom: "12%", bottom: "12%",
containLabel: true, containLabel: true,
}, },
dataZoom: [
{
type: "inside",
show: false,
xAxisIndex: [0],
start: 0,
end: 50,
// textStyle: {
// color: "#ccd7d7",
// },
},
],
xAxis: { xAxis: {
type: "category", type: "category",
axisLine: { axisLine: {

1
src/views/dike/safetyManage/declarationManage/declare/components/listPage/options/basePage.vue

@ -18,6 +18,7 @@
v-model="form.securityCategory" v-model="form.securityCategory"
placeholder="请选择安全类别" placeholder="请选择安全类别"
style="width: 100%" style="width: 100%"
disabled
> >
<el-option <el-option
v-for="dict in securityCategoryOptions" v-for="dict in securityCategoryOptions"

29
src/views/dike/safetyManage/declarationManage/examine/components/dataCharts.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="content"> <div class="content" v-loading="loading">
<div ref="pieEle" style="width: 30%; height: 100%"></div> <div ref="pieEle" style="width: 30%; height: 100%"></div>
<div ref="barEle" style="width: 70%; height: 100%"></div> <div ref="barEle" style="width: 70%; height: 100%"></div>
</div> </div>
@ -11,7 +11,9 @@ export default {
data() { data() {
return { return {
pieChartData: [], pieChartData: [],
selected: {},
barChartData: [], barChartData: [],
loading: true,
}; };
}, },
created() { created() {
@ -19,11 +21,19 @@ export default {
}, },
methods: { methods: {
async getData() { async getData() {
this.loading = true;
const res1 = await getPie(); const res1 = await getPie();
const res2 = await getHistogram(); const res2 = await getHistogram();
this.pieChartData = []; this.pieChartData = [];
for (let key in res1[0]) { for (let key in res1[0]) {
this.pieChartData.push({ value: res1[0][key], name: key }); this.pieChartData.push({
value: res1[0][key],
name: key?.substring(0, 10),
});
}
for (let i = 0; i < this.pieChartData.length; i++) {
let name = this.pieChartData[i].name;
this.selected[name] = i < 7; //10 name
} }
// for (let key in res1[0]) { // for (let key in res1[0]) {
// this.barChartData.push({ value: res1[0][key], name: key }); // this.barChartData.push({ value: res1[0][key], name: key });
@ -31,6 +41,7 @@ export default {
this.barChartData = res2; this.barChartData = res2;
this.pieInit(); this.pieInit();
this.barInit(); this.barInit();
this.loading = false;
console.log("pieChartData", this.pieChartData); console.log("pieChartData", this.pieChartData);
console.log("barChartData", this.barChartData); console.log("barChartData", this.barChartData);
}, },
@ -51,6 +62,8 @@ export default {
orient: "horizontal", orient: "horizontal",
bottom: "2%", bottom: "2%",
icon: "circle", icon: "circle",
type: "scroll",
selected: this.selected,
}, },
series: [ series: [
{ {
@ -106,6 +119,18 @@ export default {
bottom: "12%", bottom: "12%",
containLabel: true, containLabel: true,
}, },
dataZoom: [
{
type: "inside",
show: false,
xAxisIndex: [0],
start: 0,
end: 50,
// textStyle: {
// color: "#ccd7d7",
// },
},
],
xAxis: { xAxis: {
type: "category", type: "category",
axisLine: { axisLine: {

2
src/views/dike/safetyManage/safetyAppraisal/task.vue

@ -238,7 +238,7 @@
<el-input v-model="form.taskName" placeholder="请输入任务名称" /> <el-input v-model="form.taskName" placeholder="请输入任务名称" />
</el-form-item> </el-form-item>
<el-form-item label="任务堤防" prop="dikeCodes"> <el-form-item label="任务堤防" prop="dikeCodes">
<linkDike :form="form" :isMultiple="true" /> <linkDike :form="form" :isMultiple="true" v-if="open" />
<!-- <el-select <!-- <el-select
v-model="form.dikeCodes" v-model="form.dikeCodes"
placeholder="请选择堤防名称" placeholder="请选择堤防名称"

29
src/views/sluice/safetyManage/declarationManage/declare/components/dataCharts.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="content"> <div class="content" v-loading="loading">
<div ref="pieEle" style="width: 30%; height: 100%"></div> <div ref="pieEle" style="width: 30%; height: 100%"></div>
<div ref="barEle" style="width: 70%; height: 100%"></div> <div ref="barEle" style="width: 70%; height: 100%"></div>
</div> </div>
@ -11,7 +11,9 @@ export default {
data() { data() {
return { return {
pieChartData: [], pieChartData: [],
selected: {},
barChartData: [], barChartData: [],
loading: true,
}; };
}, },
created() { created() {
@ -19,11 +21,19 @@ export default {
}, },
methods: { methods: {
async getData() { async getData() {
this.loading = true;
const res1 = await getPie(); const res1 = await getPie();
const res2 = await getHistogram(); const res2 = await getHistogram();
this.pieChartData = []; this.pieChartData = [];
for (let key in res1[0]) { for (let key in res1[0]) {
this.pieChartData.push({ value: res1[0][key], name: key }); this.pieChartData.push({
value: res1[0][key],
name: key?.substring(0, 10),
});
}
for (let i = 0; i < this.pieChartData.length; i++) {
let name = this.pieChartData[i].name;
this.selected[name] = i < 7; //10 name
} }
// for (let key in res1[0]) { // for (let key in res1[0]) {
// this.barChartData.push({ value: res1[0][key], name: key }); // this.barChartData.push({ value: res1[0][key], name: key });
@ -31,6 +41,7 @@ export default {
this.barChartData = res2; this.barChartData = res2;
this.pieInit(); this.pieInit();
this.barInit(); this.barInit();
this.loading = false;
console.log("pieChartData", this.pieChartData); console.log("pieChartData", this.pieChartData);
console.log("barChartData", this.barChartData); console.log("barChartData", this.barChartData);
}, },
@ -51,6 +62,8 @@ export default {
orient: "horizontal", orient: "horizontal",
bottom: "2%", bottom: "2%",
icon: "circle", icon: "circle",
type: "scroll",
selected: this.selected,
}, },
series: [ series: [
{ {
@ -106,6 +119,18 @@ export default {
bottom: "12%", bottom: "12%",
containLabel: true, containLabel: true,
}, },
dataZoom: [
{
type: "inside",
show: false,
xAxisIndex: [0],
start: 0,
end: 50,
// textStyle: {
// color: "#ccd7d7",
// },
},
],
xAxis: { xAxis: {
type: "category", type: "category",
axisLine: { axisLine: {

29
src/views/sluice/safetyManage/declarationManage/examine/components/dataCharts.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="content"> <div class="content" v-loading="loading">
<div ref="pieEle" style="width: 30%; height: 100%"></div> <div ref="pieEle" style="width: 30%; height: 100%"></div>
<div ref="barEle" style="width: 70%; height: 100%"></div> <div ref="barEle" style="width: 70%; height: 100%"></div>
</div> </div>
@ -11,7 +11,9 @@ export default {
data() { data() {
return { return {
pieChartData: [], pieChartData: [],
selected: {},
barChartData: [], barChartData: [],
loading: true,
}; };
}, },
created() { created() {
@ -19,11 +21,19 @@ export default {
}, },
methods: { methods: {
async getData() { async getData() {
this.loading = true;
const res1 = await getPie(); const res1 = await getPie();
const res2 = await getHistogram(); const res2 = await getHistogram();
this.pieChartData = []; this.pieChartData = [];
for (let key in res1[0]) { for (let key in res1[0]) {
this.pieChartData.push({ value: res1[0][key], name: key }); this.pieChartData.push({
value: res1[0][key],
name: key?.substring(0, 10),
});
}
for (let i = 0; i < this.pieChartData.length; i++) {
let name = this.pieChartData[i].name;
this.selected[name] = i < 7; //10 name
} }
// for (let key in res1[0]) { // for (let key in res1[0]) {
// this.barChartData.push({ value: res1[0][key], name: key }); // this.barChartData.push({ value: res1[0][key], name: key });
@ -31,6 +41,7 @@ export default {
this.barChartData = res2; this.barChartData = res2;
this.pieInit(); this.pieInit();
this.barInit(); this.barInit();
this.loading = false;
console.log("pieChartData", this.pieChartData); console.log("pieChartData", this.pieChartData);
console.log("barChartData", this.barChartData); console.log("barChartData", this.barChartData);
}, },
@ -51,6 +62,8 @@ export default {
orient: "horizontal", orient: "horizontal",
bottom: "2%", bottom: "2%",
icon: "circle", icon: "circle",
type: "scroll",
selected: this.selected,
}, },
series: [ series: [
{ {
@ -106,6 +119,18 @@ export default {
bottom: "12%", bottom: "12%",
containLabel: true, containLabel: true,
}, },
dataZoom: [
{
type: "inside",
show: false,
xAxisIndex: [0],
start: 0,
end: 50,
// textStyle: {
// color: "#ccd7d7",
// },
},
],
xAxis: { xAxis: {
type: "category", type: "category",
axisLine: { axisLine: {

2
src/views/sluice/safetyManage/safetyAppraisal/task.vue

@ -238,7 +238,7 @@
<el-input v-model="form.taskName" placeholder="请输入任务名称" /> <el-input v-model="form.taskName" placeholder="请输入任务名称" />
</el-form-item> </el-form-item>
<el-form-item label="任务水闸" prop="wagaCodes"> <el-form-item label="任务水闸" prop="wagaCodes">
<linkSluice :form="form" :isMultiple="true" /> <linkSluice :form="form" :isMultiple="true" v-if="open" />
<!-- <el-select <!-- <el-select
v-model="form.wagaCodes" v-model="form.wagaCodes"
placeholder="请选择水闸名称" placeholder="请选择水闸名称"

Loading…
Cancel
Save