Browse Source

Merge branch 'release-sy-v1.0.0' into 'dev'

Release sy v1.0.0

See merge request project/water/shuili-vue!49
master_tdsql
潘裕艺 1 year ago
parent
commit
5231700c65
  1. 2
      package.json
  2. 6
      src/views/aiSupervision/layerManage/resource/LayerDetails.vue
  3. 118
      src/views/aiSupervision/waterSetting/runScene/layerTree/index.js
  4. 131
      src/views/aiSupervision/waterSetting/runScene/layerTree/supermapImageryLayer.js
  5. 74
      src/views/dike/runManage/enginerring/components/Drawer.vue
  6. 19
      src/views/dike/runManage/superVisionInspetion/questionManage/index.vue
  7. 11
      src/views/dike/runManage/superVisionInspetion/statisticAnalysis/components/Pie.vue
  8. 10
      src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue
  9. 19
      src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue
  10. 13
      src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue

2
package.json

@ -49,6 +49,7 @@
"d3": "^5.0.0", "d3": "^5.0.0",
"d3-flextree": "^2.1.2", "d3-flextree": "^2.1.2",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"docx-preview": "^0.1.14",
"echarts": "^5.5.0", "echarts": "^5.5.0",
"element-china-area-data": "^6.1.0", "element-china-area-data": "^6.1.0",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
@ -107,7 +108,6 @@
"babel-plugin-dynamic-import-node": "2.3.3", "babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2", "chalk": "2.4.2",
"connect": "3.6.6", "connect": "3.6.6",
"docx-preview": "^0.1.14",
"eslint": "6.7.2", "eslint": "6.7.2",
"eslint-plugin-vue": "6.2.2", "eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",

6
src/views/aiSupervision/layerManage/resource/LayerDetails.vue

@ -164,12 +164,16 @@ export default {
value: '021102', value: '021102',
label: 'ArcGISRest图层' label: 'ArcGISRest图层'
}, },
{
value: '081100',
label: 'SuperMapRest图层'
},
{ {
value: '030300', value: '030300',
label: 'WFS200' label: 'WFS200'
}, },
{ {
value: '113200', value: '080100',
label: 'S3M图层' label: 'S3M图层'
}, },
{ {

118
src/views/aiSupervision/waterSetting/runScene/layerTree/index.js

@ -1,3 +1,4 @@
import SuperMapImageryLayer from './supermapImageryLayer';
const createXyzLayer = (data) => const createXyzLayer = (data) =>
new sycim.XyzLayer(data.id, { new sycim.XyzLayer(data.id, {
...data, ...data,
@ -18,11 +19,32 @@ const layerTypeEnum = {
'070100': 'BINGMAP', '070100': 'BINGMAP',
'040003': 'WFS', '040003': 'WFS',
'021102': 'ARCGIS_DYNAMIC', '021102': 'ARCGIS_DYNAMIC',
113200: 'S3M' '080100': 'S3M'
}; };
// 图层响应动作 // 图层响应动作
const layerActions = { const layerActions = {
'011100': (data) =>
new sycim.BaiduLayer(data.id, {
...data,
style: data.layerTable,
crs: 'WGS84'
}),
'012000': (data) => new sycim.PrimitiveLayer(data.id),
'013000': (data) => new sycim.TilesetLayer(data.id),
'014000': createXyzLayer,
'021102': (data) =>
new sycim.ArcgisDynamicLayer(data.id, {
url: data.url
}),
'030100': (data) =>
new sycim.WmtsLayer(data.id, {
...data,
url: data.url,
layer: data.layerTable,
tileMatrixSetID: data.tileMatrixSet,
style: data.style || ''
}),
'030200': (data) => '030200': (data) =>
new sycim.WmsLayer(data.id, { new sycim.WmsLayer(data.id, {
...data, ...data,
@ -40,14 +62,6 @@ const layerActions = {
} }
return new sycim.WfsLayer(data.id, data.url, data.layerTable, options); return new sycim.WfsLayer(data.id, data.url, data.layerTable, options);
}, },
'030100': (data) =>
new sycim.WmtsLayer(data.id, {
...data,
url: data.url,
layer: data.layerTable,
tileMatrixSetID: data.tileMatrixSet,
style: data.style || ''
}),
'030400': async (data) => { '030400': async (data) => {
const options = {}; const options = {};
if (data.relationStyleId) { if (data.relationStyleId) {
@ -56,11 +70,10 @@ const layerActions = {
} }
return new sycim.GeoJsonLayer(data.id, data.url, options); return new sycim.GeoJsonLayer(data.id, data.url, options);
}, },
'011100': (data) => '040003': (data) =>
new sycim.BaiduLayer(data.id, { new sycim.WfsLayer(data.id, data.url, data.layerTable, {
...data, cql_filter: data.filter,
style: data.layerTable, propertyName: '*'
crs: 'WGS84'
}), }),
'050100': (data) => { '050100': (data) => {
let url = `${data.proxyUrl}${data.url}`; let url = `${data.proxyUrl}${data.url}`;
@ -77,22 +90,10 @@ const layerActions = {
} }
}); });
}, },
'060100': createXyzLayer,
'070100': (data) => '070100': (data) =>
new sycim.BingMapLayer(data.id, { new sycim.BingMapLayer(data.id, {
...data ...data
}),
'060100': createXyzLayer,
'014000': createXyzLayer,
'013000': (data) => new sycim.TilesetLayer(data.id),
'012000': (data) => new sycim.PrimitiveLayer(data.id),
'040003': (data) =>
new sycim.WfsLayer(data.id, data.url, data.layerTable, {
cql_filter: data.filter,
propertyName: '*'
}),
'021102': (data) =>
new sycim.ArcgisDynamicLayer(data.id, {
url: data.url
}) })
}; };
@ -116,9 +117,10 @@ function zoomToLayerByType(data) {
defaultZoomToLayer(data); defaultZoomToLayer(data);
} }
} }
const supermapTileLayer = {}; const supermapLayer = {};
// 超图s3m图层定位
function zoomToS3MLayer(data) { function zoomToS3MLayer(data) {
if (supermapTileLayer[data.id]) { if (supermapLayer[data.id]) {
Cesium.Resource.fetchJson(data.url + '/scenes.json').then(function (scenes) { Cesium.Resource.fetchJson(data.url + '/scenes.json').then(function (scenes) {
let sname = scenes && scenes[0].name; let sname = scenes && scenes[0].name;
Cesium.Resource.fetchJson(data.url + '/scenes/' + sname + '.json').then(function (jsonData) { Cesium.Resource.fetchJson(data.url + '/scenes/' + sname + '.json').then(function (jsonData) {
@ -144,18 +146,16 @@ function zoomToS3MLayer(data) {
} }
} }
// 超图影像图层定位
function zoomToSuperMapImageryLayer(data) {
if (supermapLayer[data.id]) {
supermapLayer[data.id].zoomToLayer();
}
}
// 图层缩放响应动作 // 图层缩放响应动作
const zoomToLayerActions = { const zoomToLayerActions = {
'030200': zoomToLayerByType,
'030300': zoomToLayerByType,
'030100': zoomToLayerByType,
'030400': zoomToLayerByType,
'011100': zoomToLayerByType, '011100': zoomToLayerByType,
'050100': zoomToLayerByType,
'070100': zoomToLayerByType,
'060100': zoomToLayerByType,
'014000': zoomToLayerByType,
'013000': zoomToLayerByType,
'012000': (data) => { '012000': (data) => {
// modal // modal
const { modelInitPosition } = data; const { modelInitPosition } = data;
@ -163,27 +163,47 @@ const zoomToLayerActions = {
const p = JSON.parse(modelInitPosition); const p = JSON.parse(modelInitPosition);
window.viewer.flyToPosition(new sycim.Position(p.lng, p.lat, p.alt + 500, 0, -90, 0)); window.viewer.flyToPosition(new sycim.Position(p.lng, p.lat, p.alt + 500, 0, -90, 0));
}, },
'040003': zoomToLayerByType, '013000': zoomToLayerByType,
'014000': zoomToLayerByType,
'021102': zoomToLayerByType, '021102': zoomToLayerByType,
113200: zoomToS3MLayer '030200': zoomToLayerByType,
'030300': zoomToLayerByType,
'030100': zoomToLayerByType,
'030400': zoomToLayerByType,
'040003': zoomToLayerByType,
'050100': zoomToLayerByType,
'060100': zoomToLayerByType,
'070100': zoomToLayerByType,
'080100': zoomToS3MLayer,
'081100': zoomToSuperMapImageryLayer
}; };
// 添加图层 // 添加图层
export async function addLayer(layerData) { export async function addLayer(layerData) {
const { layerType, url, id } = layerData; const { layerType, url, id } = layerData;
let action = null; let action = null;
if (layerType === '113200') { // 超图 S3M图层
if (supermapTileLayer[id]) { if (layerType === '080100') {
supermapTileLayer[id].show = true; if (supermapLayer[id]) {
supermapLayer[id].show = true;
} else { } else {
const layerPromise = window.viewer.scene.open(url, { const layerPromise = window.viewer.scene.open(url, {
autoSetView: false //不自动定位 autoSetView: false //不自动定位
}); });
layerPromise.then((layer) => { layerPromise.then((layer) => {
supermapTileLayer[id] = layer?.[0]; supermapLayer[id] = layer?.[0];
}); });
} }
return; return;
} else if (layerType === '081100') {
// 超图的影像图层
if (supermapLayer[id]) {
supermapLayer?.[id]?.show();
} else {
const layer = new SuperMapImageryLayer(url, { viewer: window.viewer });
supermapLayer[id] = layer;
}
return;
} }
if (!layerType || !(action = layerActions[layerType])) return; if (!layerType || !(action = layerActions[layerType])) return;
const layer = await action(layerData); const layer = await action(layerData);
@ -207,14 +227,16 @@ export function removeLayer(layerData) {
const { id, layerType } = layerData; const { id, layerType } = layerData;
if (!layerType) return; if (!layerType) return;
const type = layerTypeEnum[layerType]; const type = layerTypeEnum[layerType];
if (layerType === '113200') { if (layerType === '080100') {
if (supermapTileLayer[id]) { if (supermapLayer[id]) {
supermapTileLayer[id].show = false; supermapLayer[id].show = false;
} }
} else if (layerType === '081100') {
supermapLayer?.[id]?.hide();
} else { } else {
window.viewer.removeLayer({ window.viewer.removeLayer({
id, id,
type: sycim.LayerType[type] type: SyCim.LayerType[type]
}); });
} }
} }

131
src/views/aiSupervision/waterSetting/runScene/layerTree/supermapImageryLayer.js

@ -0,0 +1,131 @@
import axios from 'axios';
class SuperMapImageryLayer {
constructor(url, options) {
this.viewer = options.viewer;
this.options = options || {};
this.layerUrl = url;
this.layerName = '';
this.layerInfo = null;
this.layerProvider = null;
this.scales84 = [];
this.scalesweb = [];
this._delegate = null;
this.loadData();
}
loadData() {
this.scales84 = [
3.38032714321e-9, 6.76065428641e-9, 1.352130857282e-8, 2.704261714564e-8, 5.408523429128e-8, 1.0817046858257e-7,
2.1634093716514e-7, 4.3268187433028e-7, 8.6536374866056e-7, 1.73072749732112e-6, 3.46145499464224e-6,
6.92290998928448e-6, 1.3845819978568952e-5, 2.7691639957137904e-5, 5.538327991427581e-5, 1.1076655982855162e-4,
2.2153311965710323e-4, 4.4306623931420646e-4, 8.861324786284129e-4, 0.0017722649572568258, 0.0035445299145136517,
0.007089059829027303
];
this.scalesweb = [
1.6901635716e-9, 3.38032714321e-9, 6.76065428641e-9, 1.352130857282e-8, 2.704261714564e-8, 5.408523429128e-8,
1.0817046858257e-7, 2.1634093716514e-7, 4.3268187433028e-7, 8.6536374866056e-7, 1.73072749732112e-6,
3.46145499464224e-6, 6.92290998928448e-6, 1.3845819978568952e-5, 2.7691639957137904e-5, 5.538327991427581e-5,
1.1076655982855162e-4, 2.2153311965710323e-4, 4.4306623931420646e-4, 8.861324786284129e-4, 0.0017722649572568258,
0.0035445299145136517, 0.007089059829027303
];
axios
.get(`${this.layerUrl}.json`)
.then((res) => {
if (res.status !== 200) return;
const result = res.data;
this.layerName = this.options.name || result.name;
this.layerInfo = result;
const rectangle = sycim.Rectangle.fromDegrees(-180, -90, 180, 90);
const epsgcode = result.prjCoordSys.epsgCode;
let tilingScheme = '';
let minlevel = 0;
let maxlevel = 22;
let originx = 0;
let originy = 0;
if (epsgcode === 4326) {
tilingScheme = new sycim.GeographicTilingScheme({
numberOfLevelZeroTilesX: 2,
numberOfLevelZeroTilesY: 1
});
originx = -180;
originy = 90;
if (this.options.minimumLevel !== undefined) {
minlevel = this.options.minimumLevel;
} else {
minlevel = 0;
}
if (this.options.maximumLevel !== undefined) {
maxlevel = this.options.maximumLevel;
} else {
maxlevel = 22;
}
}
if (epsgcode === 3857) {
tilingScheme = new sycim.WebMercatorTilingScheme();
originx = -20037508.34;
originy = 20037508.34;
if (this.options.minimumLevel !== undefined) {
console.log('not undefined');
minlevel = this.options.minimumLevel;
} else {
minlevel = 0;
}
if (this.options.maximumLevel !== undefined) {
maxlevel = this.options.maximumLevel;
} else {
maxlevel = 22;
}
}
this.layerProvider = new sycim.Cesium.UrlTemplateImageryProvider({
url:
this.layerUrl +
"/tileImage.png?transparent=true&cacheEnabled=true&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={'x':" +
originx +
",'y':" +
originy +
'}',
rectangle: rectangle,
minimumLevel: minlevel || 0,
maximumLevel: maxlevel || 22,
tilingScheme: tilingScheme,
customTags: {
scale: function (imageryProvider, x, y, level) {
if (epsgcode === 4326) {
return this.scales84[level];
}
if (epsgcode === 3857) {
return this.scalesweb[level];
}
},
scales84: this.scales84,
scalesweb: this.scalesweb // Add the missing property "scalesweb"
}
});
this._delegate = viewer.imageryLayers.addImageryProvider(this.layerProvider);
})
.catch((err) => {
console.log(err);
});
}
zoomToLayer() {
if (!this._delegate) return;
const { left, bottom, right, top } = this.layerInfo.bounds;
this.viewer.camera.flyTo({
destination: sycim.Rectangle.fromDegrees(left, bottom, right, top)
});
}
show() {
if (!this._delegate) return;
this._delegate.show = true;
}
hide() {
if (!this._delegate) return;
this._delegate.show = false;
}
}
export default SuperMapImageryLayer;

74
src/views/dike/runManage/enginerring/components/Drawer.vue

@ -15,31 +15,10 @@ export default {
return { return {
dictMapData: {}, dictMapData: {},
xcTreeData: [], xcTreeData: [],
tableData: [
{ content: "", photos: "", isNormal: "", problems: "" }, // 1
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
{ content: "", photos: "", isNormal: "", problems: "" },
],
}; };
}, },
methods: { methods: {
//
transformArr(treeList) { transformArr(treeList) {
// 广 // 广
function getW(item, w = 0) { function getW(item, w = 0) {
@ -65,51 +44,16 @@ export default {
return treeList; return treeList;
}, },
handleSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (
rowIndex < 4 ||
(rowIndex > 4 && rowIndex < 9) ||
(rowIndex > 8 && rowIndex < 11) ||
(rowIndex > 10 && rowIndex < 13) ||
(rowIndex > 12 && rowIndex < 18)
) {
if (
rowIndex === 0 ||
rowIndex === 5 ||
rowIndex === 9 ||
rowIndex === 11 ||
rowIndex === 13
) {
return {
rowspan: [4, 4, 2, 2, 5][[0, 5, 9, 11, 13].indexOf(rowIndex)],
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
}
},
getDetailsData() { getDetailsData() {
getDikePatrolDetails(this.$route.query.id).then((res) => { getDikePatrolDetails(this.$route.query.id).then((res) => {
console.log("getDikePatrolDetails >>>>> ", res); console.log("详情 >>>>> ", res);
if (res.data?.items) {
this.tableData[0].photos = res.data.items[0]?.imgs || "无";
this.tableData[0].content = res.data.items[0]?.content || "";
this.tableData[0].problems = res.data.items[0]?.problem || "无";
this.tableData[0].isNormal = res.data.items[0]?.status ? "是" : "否";
}
}); });
}, },
}, },
created() { created() {
getCheckingDictTree("df_xs_c_classfy").then((res) => { getCheckingDictTree("df_xs_c_classfy").then((res) => {
this.xcTreeData = this.transformArr(res?.data); this.xcTreeData = this.transformArr(res?.data);
console.log("this.xcTreeData >>>>> ", this.xcTreeData);
}); });
getDictMapData("df_xs_c_classfy").then((res) => { getDictMapData("df_xs_c_classfy").then((res) => {
this.dictMapData = res?.data || {}; this.dictMapData = res?.data || {};
@ -248,19 +192,19 @@ export default {
.masking { .masking {
position: absolute; position: absolute;
top: 0; top: 0;
width: 800px; width: 70%;
height: 100%; height: 100%;
right: 0; right: 0;
z-index: 10; z-index: 10;
background-color: #fff; background-color: #fff;
transition: left 0.5s ease-in-out; transition: left 0.5s ease-in-out;
box-shadow: -8px 0px 38px 0px rgba(0, 0, 0, 0.6); box-shadow: -8px 0px 38px 0px rgba(0, 0, 0, 0.6);
overflow: auto;
.close-btn { .close-btn {
width: 32px; width: 32px;
height: 32px; height: 32px;
position: absolute; position: absolute;
top: 48px; top: 32px;
left: -16px; left: -16px;
background-color: #fff; background-color: #fff;
border: 1px solid #dcdcdc; border: 1px solid #dcdcdc;
@ -277,14 +221,16 @@ export default {
.drawer-title { .drawer-title {
width: 100%; width: 100%;
height: 64px; height: 48px;
line-height: 64px; line-height: 48px;
padding-left: 16px; padding-left: 16px;
border-bottom: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7;
} }
.center-table { .center-table {
padding: 16px; padding: 16px;
height: calc(100% - 48px);
overflow: auto;
} }
} }

19
src/views/dike/runManage/superVisionInspetion/questionManage/index.vue

@ -71,6 +71,11 @@ export default {
this.checkDetailData.problemDto.handleSituationRecordsArr = this.checkDetailData.problemDto.handleSituationRecordsArr =
this.checkDetailData.problemDto.handleSituationRecords.split(","); this.checkDetailData.problemDto.handleSituationRecords.split(",");
} }
if (this.checkDetailData.doneTime) {
this.checkDetailData.showDoneTime = dayjs(
this.checkDetailData.doneTime
).format("YYYY年MM月DD日");
}
}); });
}, },
// //
@ -125,20 +130,6 @@ export default {
}, },
}); });
}, },
// doneTime
calcDeadLine(time) {
if (!time) return "-";
let days = dayjs(time).diff(dayjs(), "day");
let seconds = 0;
if (days <= 0) {
seconds = dayjs(time).diff(dayjs(), "second");
}
return days > 0
? days
: seconds > 0
? 1
: dayjs(time).diff(dayjs(), "day") - 1;
},
// //
problemLevelFormat(level) { problemLevelFormat(level) {
if (!level) return ""; if (!level) return "";

11
src/views/dike/runManage/superVisionInspetion/statisticAnalysis/components/Pie.vue

@ -9,7 +9,9 @@ import * as echarts from "echarts";
export default { export default {
data() { data() {
return {}; return {
myChart: null,
};
}, },
props: { props: {
title: { title: {
@ -47,8 +49,9 @@ export default {
}, },
}; };
}); });
let chartDom = this.$refs.pieEle; if (!this.myChart) {
let myChart = echarts.init(chartDom); this.myChart = echarts.init(this.$refs.pieEle);
}
let option = { let option = {
title: { title: {
left: "29%", left: "29%",
@ -128,7 +131,7 @@ export default {
}, },
], ],
}; };
myChart.setOption(option); this.myChart.setOption(option);
}, },
}, },
}; };

10
src/views/dike/runManage/superVisionInspetion/statisticAnalysis/index.vue

@ -25,7 +25,7 @@ export default {
paramsData: { paramsData: {
riverLocation: "", riverLocation: "",
dikeType: "", dikeType: "",
adcd: "", adcdStart: "",
taskId: "", taskId: "",
}, },
questionLevelList: [], questionLevelList: [],
@ -36,7 +36,7 @@ export default {
initData() { initData() {
getSuperviseStatisticTotal({ getSuperviseStatisticTotal({
dikeType: this.paramsData.dikeType || null, dikeType: this.paramsData.dikeType || null,
adcd: this.paramsData.adcd || null, adcdStart: this.paramsData.adcdStart || null,
taskId: this.paramsData.taskId || null, taskId: this.paramsData.taskId || null,
riverLocation: this.paramsData.riverLocation || null, riverLocation: this.paramsData.riverLocation || null,
}).then((res) => { }).then((res) => {
@ -104,7 +104,7 @@ export default {
this.remoteOptions = []; this.remoteOptions = [];
this.paramsData = { this.paramsData = {
wagaType: "", wagaType: "",
adcd: "", adcdStart: "",
remoteValue: "", remoteValue: "",
}; };
if (this.typeSelect === "") { if (this.typeSelect === "") {
@ -220,7 +220,7 @@ export default {
<el-select <el-select
size="mini" size="mini"
class="statistic-analysis-select-style" class="statistic-analysis-select-style"
v-model="paramsData.wagaType" v-model="paramsData.dikeType"
filterable filterable
@change="handleChangeQuery" @change="handleChangeQuery"
placeholder="请选择" placeholder="请选择"
@ -239,7 +239,7 @@ export default {
size="mini" size="mini"
class="statistic-analysis-select-style" class="statistic-analysis-select-style"
:options="areasOptions" :options="areasOptions"
v-model="paramsData.adcd" v-model="paramsData.adcdStart"
:props="areasOptionProps" :props="areasOptionProps"
placeholder="请选择行政区划" placeholder="请选择行政区划"
clearable clearable

19
src/views/sluice/runManage/supervisionInspetion/questionManage/index.vue

@ -72,6 +72,11 @@ export default {
this.checkDetailData.problemDto.handleSituationRecordsArr = this.checkDetailData.problemDto.handleSituationRecordsArr =
this.checkDetailData.problemDto.handleSituationRecords.split(","); this.checkDetailData.problemDto.handleSituationRecords.split(",");
} }
if (this.checkDetailData.doneTime) {
this.checkDetailData.showDoneTime = dayjs(
this.checkDetailData.doneTime
).format("YYYY年MM月DD日");
}
}); });
}, },
// //
@ -126,20 +131,6 @@ export default {
}, },
}); });
}, },
// doneTime
calcDeadLine(time) {
if (!time) return "-";
let days = dayjs(time).diff(dayjs(), "day");
let seconds = 0;
if (days <= 0) {
seconds = dayjs(time).diff(dayjs(), "second");
}
return days > 0
? days
: seconds > 0
? 1
: dayjs(time).diff(dayjs(), "day") - 1;
},
// //
wagaLocFormat(wagaLoc) { wagaLocFormat(wagaLoc) {
let res = ""; let res = "";

13
src/views/sluice/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue

@ -9,7 +9,9 @@ import * as echarts from "echarts";
export default { export default {
data() { data() {
return {}; return {
myChart: null,
};
}, },
props: { props: {
title: { title: {
@ -47,8 +49,9 @@ export default {
}, },
}; };
}); });
let chartDom = this.$refs.pieEle; if (!this.myChart) {
let myChart = echarts.init(chartDom); this.myChart = echarts.init(this.$refs.pieEle);
}
let option = { let option = {
title: { title: {
left: "29%", left: "29%",
@ -128,7 +131,7 @@ export default {
}, },
], ],
}; };
myChart.setOption(option); this.myChart.setOption(option);
}, },
}, },
}; };
@ -143,7 +146,7 @@ export default {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
.canvas { .canvas {
min-width: 200px; width: 500px;
height: 200px; height: 200px;
padding: 10px; padding: 10px;
} }

Loading…
Cancel
Save