sk 1 سال پیش
والد
کامیت
f99cce4f9c
2فایلهای تغییر یافته به همراه42 افزوده شده و 61 حذف شده
  1. 1 1
      app/src/views/FireCondition/components/hzfbCont.vue
  2. 41 60
      app/src/views/FireCondition/components/hzfxCont.vue

+ 1 - 1
app/src/views/FireCondition/components/hzfbCont.vue

@@ -64,7 +64,7 @@
 		},
 		methods: {
 			rowClickHandler(val) {
-				this.$router.push(`/detail?id=${val.id}`);
+				// this.$router.push(`/detail?id=${val.id}`);
 			},
 			funUnitList() {
 				hzfxLsit({

+ 41 - 60
app/src/views/FireCondition/components/hzfxCont.vue

@@ -18,9 +18,8 @@
 		data() {
 			return {
 				options: [],
-				tableData: [],
-				tableData1: [],
-				// tableData2: [],
+				options1: [],
+				options2: [],
 				unitList: [],
 				value: "全市",
 				params: {
@@ -39,23 +38,23 @@
 				// risklevel: "", //风险等级
 			};
 		},
-		  props: {
-		    qy: String,
-		  },
-		  watch: {
-		    qy: {
-		      handler(val) {
-		        this.value = val;
-		        this.funUnitList();
-		        this.handUnitList();
-		      },
-		      immediate: true,
-		      deep: true,
-		    },
-		  },
+		props: {
+			qy: String,
+		},
+		watch: {
+			qy: {
+				handler(val) {
+					this.value = val;
+					this.funUnitList();
+					this.handUnitList();
+				},
+				immediate: true,
+				deep: true,
+			},
+		},
 		methods: {
 			rowClickHandler(val) {
-				this.$router.push(`/detail?id=${val.id}`);
+				// this.$router.push(`/detail?id=${val.id}`);
 			},
 			funUnitList() {
 				hzfGjzb({
@@ -63,18 +62,21 @@
 					qx: this.qy === "重庆市" ? "" : this.qy,
 				}).then((res) => {
 					this.options = [res.data];
+					console.log(this.options,'关键指标');
 				});
 				hzfxQhyy({
 					...this.params,
 					qx: this.qy === "重庆市" ? "" : this.qy,
 				}).then((res) => {
-					this.options1 =  [res.data];
+					this.options1 = [res.data];
+					console.log(this.options1,'火灾分布');
 				});
 				hzfxQhcs({
 					...this.params,
 					qx: this.qy === "重庆市" ? "" : this.qy,
 				}).then((res) => {
-					this.options2 =  [res.data];
+					this.options2 = [res.data];
+					console.log(this.options2,'起火场所');
 				});
 			},
 			handleSizeChange(val) {
@@ -84,35 +86,12 @@
 			handleCurrentChange(val) {
 				this.params.pageNum = val;
 				this.funUnitList();
-			}, 
+			},
 			handUnitList() {
 				hzfGjzb({
 					...this.params,
 					qy: this.value === "重庆市" ? "" : this.value,
-				}).then((res) => {
-					// const list = res.data.rows[0];
-					// this.unitList = [{
-					// 		title: "高层建筑总数(栋)",
-					// 		unitNum: list.ggjz + list.gyjz + list.zzjz,
-					// 	},
-					// 	{
-					// 		title: "超高层建筑总数(栋)",
-					// 		unitNum: list.cggjz,
-					// 	},
-					// 	{
-					// 		title: "老旧高层建筑总数(栋)",
-					// 		unitNum: list.ljzzgc,
-					// 	},
-					// 	{
-					// 		title: "公共建筑总数(栋)",
-					// 		unitNum: list.ggjz,
-					// 	},
-					// 	{
-					// 		title: "住宅建筑总数(栋)",
-					// 		unitNum: list.zzjz,
-					// 	},
-					// ];
-				});
+				}).then((res) => {});
 			},
 			resetForm() {
 				this.value = "";
@@ -130,7 +109,7 @@
 				return this.showFlag === i ? 'active' : 'tab-item'
 			}
 		},
-		created() {
+		mounted() {
 			this.funUnitList();
 			this.handUnitList();
 			area({
@@ -167,7 +146,7 @@
 			</div>
 		</div>
 		<div v-if="showFlag===1">
-			<basic-table :data="tableData" @row-click="rowClickHandler" style="text-align: center">
+			<basic-table :data="options" @row-click="rowClickHandler" style="text-align: center">
 				<el-table-column type="index" label="序号">
 				</el-table-column>
 				<el-table-column prop="qx" label="区县" show-overflow-tooltip>
@@ -191,44 +170,46 @@
 			</basic-table>
 		</div>
 		<div v-if="showFlag===2">
-			<basic-table :data="tableData1" @row-click="rowClickHandler" style="text-align: center">
+			<basic-table :data="options1" @row-click="rowClickHandler" style="text-align: center">
 				<el-table-column type="index" label="序号">
 				</el-table-column>
 				<el-table-column prop="qx" label="区县" show-overflow-tooltip>
 				</el-table-column>
 				<el-table-column prop="dqhz" label="电气火灾(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="fh" label="放火(起)" show-overflow-tooltip>
+				<el-table-column prop="fh" label="放火(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="jd" label="静电(起)" show-overflow-tooltip>
+				<el-table-column prop="jd" label="静电(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="lj" label="雷击(起)" show-overflow-tooltip>
+				<el-table-column prop="lj" label="雷击(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
 				<el-table-column prop="rfyhbz" label="燃放烟花爆竹(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
 				<el-table-column prop="sczy" label="生产作业(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="wh" label="玩火(起)" show-overflow-tooltip>
+				<el-table-column prop="wh" label="玩火(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="xy" label="吸烟(起)" show-overflow-tooltip>
+				<el-table-column prop="xy" label="吸烟(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="ylhz" label="遗留火种(起)" show-overflow-tooltip>
+				<el-table-column prop="ylhz" label="遗留火种(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="yhbs" label="用火不慎(起)" show-overflow-tooltip>
+				<el-table-column prop="yhbs" label="用火不慎(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="zr" label="自燃(起)" show-overflow-tooltip>
+				<el-table-column prop="zr" label="自燃(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="bpcyy" label="不排除原因(起)" show-overflow-tooltip>
+				<el-table-column prop="bpcyy" label="不排除原因(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
-				<el-table-column prop="xxdz" label="其他(起)" show-overflow-tooltip>
+				<el-table-column prop="xxdz" label="其他(起)" width="150" show-overflow-tooltip>
 				</el-table-column>
 			</basic-table>
 		</div>
 		<div v-if="showFlag===3">
-			<basic-table :data="tableData2" @row-click="rowClickHandler" style="text-align: center">
+			<basic-table :data="options2" @row-click="rowClickHandler" style="text-align: center">
 				<el-table-column type="index" label="序号">
 				</el-table-column>
-				<el-table-column prop="qx" label="办公场所" show-overflow-tooltip>
+				<el-table-column prop="qx" label="区县" show-overflow-tooltip>
+				</el-table-column>
+				<el-table-column prop="bgsc" label="办公场所" show-overflow-tooltip>
 				</el-table-column>
 				<el-table-column prop="gcjzmc" label="宾馆、饭店、招待所" width="150" show-overflow-tooltip>
 				</el-table-column>