Forráskód Böngészése

对公务用车 的 大屏界面和后台界面 进行调整

zhanghao 5 hónapja
szülő
commit
8ecddb7542

+ 14 - 5
src/api/zcustom/land.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询房产土地列表
 export function listPlatHousingLand(query) {
   return request({
-    url: '/large/housing/list',
+    url: '/zcustom/housing/list',
     method: 'get',
     params: query
   })
@@ -12,7 +12,7 @@ export function listPlatHousingLand(query) {
 // 查询房产土地详细
 export function getPlatHousingLand(id) {
   return request({
-    url: '/large/housing/getInfo/' + id,
+    url: '/zcustom/housing/getInfo/' + id,
     method: 'get'
   })
 }
@@ -20,7 +20,7 @@ export function getPlatHousingLand(id) {
 // 新增房产土地
 export function addPlatHousingLand(data) {
   return request({
-    url: '/large/housing/add',
+    url: '/zcustom/housing/add',
     method: 'post',
     data: data
   })
@@ -29,7 +29,7 @@ export function addPlatHousingLand(data) {
 // 修改房产土地
 export function updatePlatHousingLand(data) {
   return request({
-    url: '/large/housing/edit',
+    url: '/zcustom/housing/edit',
     method: 'post',
     data: data
   })
@@ -38,7 +38,16 @@ export function updatePlatHousingLand(data) {
 // 删除房产土地
 export function delPlatHousingLand(id) {
   return request({
-    url: '/large/housing/remove/' + id,
+    url: '/zcustom/housing/remove/' + id,
     method: 'get'
   })
 }
+
+// 导入excel
+export function uploadExcel(file) {
+  return request({
+    url: '/zcustom/housing/upload',
+    data: file,
+    method: 'post'
+  })
+}

+ 12 - 0
src/api/zcustom/public.js

@@ -51,3 +51,15 @@ export function delPlatPublicCar(id) {
     method: 'get'
   })
 }
+
+// 导入json
+export function uploadJson(type, json) {
+  return request({
+    url: '/zcustom/public/upload',
+    params: {
+      type: type,
+      json: json
+    },
+    method: 'post'
+  })
+}

+ 2 - 0
src/views/screen/map/mapTwo.vue

@@ -275,6 +275,8 @@ export default {
     beBack(){
       this.initCharts()
       this.showBack = false
+      this.appOrg = "10001"
+      this.$emit('transmit', this.appOrg)
     }
   },
 };

+ 9 - 4
src/views/screen/official/carWarning.vue

@@ -71,7 +71,7 @@
           :legend="legend"
           y-color="#FFF"
           l-color="#FFF"
-          width="80%"
+          width="85%"
           height="124px"
           style="left: 30px;"
         />
@@ -88,7 +88,7 @@
           :legend="legend"
           y-color="#FFF"
           l-color="#FFF"
-          width="80%"
+          width="85%"
           height="124px"
           style="left: 30px;"
         />
@@ -241,7 +241,9 @@ export default {
         data: this.manageLastHalf.z1,
         axisLabel: {
           color: "white",
-          fontSize: 7
+          fontSize: 10,
+          interval: 0,
+          padding: [2, 0, 2, 0]
         },
         axisTick: {
           show: false,
@@ -304,7 +306,9 @@ export default {
         data: this.manageLastHalf.z2,
         axisLabel: {
           color: "white",
-          fontSize: 7
+          fontSize: 10,
+          interval: 0,
+          padding: [2, 0, 2, 0]
         },
         axisTick: {
           show: false,
@@ -314,6 +318,7 @@ export default {
         type: "value",
         axisLabel: {
           color: "white",
+          fontSize: 8
         },
         splitLine: {
           show: true,

+ 10 - 9
src/views/screen/official/main.vue

@@ -129,7 +129,7 @@
           <div class="cont-title">运行管理</div>
         </div>
         <div class="components-item bg3">
-          <car-warning :key="appOrg" :manageTopHalf="manageTopHalf" :manageLastHalf="manageLastHalf" v-if="this.flag===2"></car-warning>
+          <car-warning :key="appOrg" :manageTopHalf="manageTopHalf" :manageLastHalf="manageLastHalf" v-if="this.flag >= 2"></car-warning>
         </div>
       </div>
     </div>
@@ -222,11 +222,6 @@ export default {
   //     default: "0000",
   //   },
   // },
-  watch:{
-    appOrg(newValue,oldValue){
-      this.resetData();
-    },
-  },
   data() {
     return {
       flag: 0,
@@ -268,7 +263,7 @@ export default {
       this.appOrg = appOrg
       this.resource();
       this.monitor();
-      this.operationManage();
+      this.operationManageTopHalf();
     },
 
     resource(){
@@ -277,7 +272,7 @@ export default {
             this.resourceData = res.data
             this.resourceData.cd = 5 - this.resourceData.totalCarNum.toString().length
             this.resourceData.totalCarNum = this.resourceData.totalCarNum.toString().padStart(5, '0');
-            this.resourceData.percentageLack = Math.round((this.resourceData.lackCarNum / this.resourceData.totalCarNum) * 100);
+            this.resourceData.percentageLack = Math.round(((this.resourceData.totalCarNum - this.resourceData.establishmentsCarNum) / this.resourceData.totalCarNum) * 100);
             this.resourceData.percentagePosess = Math.round((this.resourceData.establishmentsCarNum / this.resourceData.totalCarNum) * 100);
             this.carTypeNum = [
               {
@@ -333,13 +328,15 @@ export default {
         }
       })
     },
-    operationManage(){
+    operationManageTopHalf(){
       getOperationManageTopHalf(this.appOrg).then(res => {
         if (Number(res.code) === 200) {
           this.manageTopHalf = res.data
           this.flag++
         }
       })
+    },
+    operationManageLastHalf(){
       getOperationManageLastHalf().then(res => {
         if (Number(res.code) === 200) {
           this.manageLastHalf = res.data
@@ -347,6 +344,10 @@ export default {
         }
       })
     },
+    operationManage(){
+      this.operationManageTopHalf()
+      this.operationManageLastHalf()
+    },
 
 
     chooseOp(title){

+ 20 - 2
src/views/zcustom/carRank/index.vue

@@ -93,8 +93,12 @@
         <el-form-item label="车牌号" prop="vechileNum">
           <el-input v-model="form.vechileNum" placeholder="请输入车牌号" />
         </el-form-item>
-        <el-form-item label="单位编码" prop="appEncode">
-          <el-input v-model="form.appEncode" placeholder="请输入单位编码" />
+        <el-form-item label="具体单位">
+          <el-cascader :options="treeList" placeholder="请选择单位" v-model="form.appEncode" :props="props" style="width: 400px">
+            <template slot-scope="{ node, data }">
+              <span>{{ data.appName }}</span>
+            </template>
+          </el-cascader>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -107,11 +111,19 @@
 
 <script>
 import { listPlatPublicCarRankPerson, getPlatPublicCarRankPerson, delPlatPublicCarRankPerson, addPlatPublicCarRankPerson, updatePlatPublicCarRankPerson } from "@/api/zcustom/carRank";
+import { getListTree } from '@/api/zcustom/platAppOrg'
 
 export default {
   name: "PlatPublicCarRankPerson",
   data() {
     return {
+      treeList:[],
+      props:{
+        value: 'appEncode',
+        label: 'appName',
+        checkStrictly: true,
+        emitPath: false
+      },
       // 根路径
       baseURL: process.env.VUE_APP_BASE_API,
       // 遮罩层
@@ -165,8 +177,14 @@ export default {
   },
   created() {
     this.getList();
+    this.getListTree()
   },
   methods: {
+    getListTree(){
+      getListTree().then(res => {
+        this.treeList.push(res.data)
+      })
+    },
     /** 查询公务用车列表 */
     getList() {
       this.loading = true;

+ 43 - 11
src/views/zcustom/land/index.vue

@@ -54,11 +54,13 @@
       <el-col :span="1.5">
         <el-button
           type="warning"
-          icon="el-icon-download"
+          icon="el-icon-upload"
           size="mini"
-          @click="handleExport"
-          v-hasPermi="['zcustom:platHousingLand:export']"
-        >导出</el-button>
+          @click="handleUpload"
+        >导入</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <input v-show="false" type="file" ref="fileInput" @change="handleFileChange" />
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -108,7 +110,7 @@
 
     <!-- 添加或修改房产土地对话框 -->
     <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="房产名称" prop="housing">
           <el-input v-model="form.housing" placeholder="请输入房产名称" />
         </el-form-item>
@@ -125,6 +127,14 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="拥有所有权" prop="ownershipFlag">
+          <el-radio v-model="form.ownershipFlag" :label=0>否</el-radio>
+          <el-radio v-model="form.ownershipFlag" :label=1>是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否投资" prop="investmentPlanFlag">
+          <el-radio v-model="form.investmentPlanFlag" :label=0>否</el-radio>
+          <el-radio v-model="form.investmentPlanFlag" :label=1>是</el-radio>
+        </el-form-item>
         <el-form-item label="施工时间" prop="constructionTime">
           <el-date-picker clearable
                           v-model="form.constructionTime"
@@ -143,7 +153,14 @@
 </template>
 
 <script>
-import { listPlatHousingLand, getPlatHousingLand, delPlatHousingLand, addPlatHousingLand, updatePlatHousingLand } from "@/api/zcustom/land";
+import {
+  listPlatHousingLand,
+  getPlatHousingLand,
+  delPlatHousingLand,
+  addPlatHousingLand,
+  updatePlatHousingLand,
+  uploadExcel
+} from '@/api/zcustom/land'
 import { parseTime } from '../../../utils/ruoyi'
 
 export default {
@@ -221,6 +238,12 @@ export default {
         type: [
           { required: true, message: "房产类型不能为空", trigger: "change" }
         ],
+        ownershipFlag: [
+          { required: true, message: "所有权状态不能为空", trigger: "change" }
+        ],
+        investmentPlanFlag: [
+          { required: true, message: "投资标志不能为空", trigger: "change" }
+        ],
         constructionTime: [
           { required: true, message: "施工时间不能为空", trigger: "blur" }
         ]
@@ -322,11 +345,20 @@ export default {
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('zcustom/platHousingLand/export', {
-        ...this.queryParams
-      }, `platHousingLand_${new Date().getTime()}.xlsx`)
+    /** 导入按钮操作 */
+    handleUpload() {
+      this.$refs.fileInput.click()
+    },
+    handleFileChange(event) {
+      console.log("734888888888")
+      const selectedFile = event.target.files[0];
+      const formData = new FormData();
+      formData.append('file', selectedFile);
+      uploadExcel(formData).then(res =>{
+        if (res.code === 200){
+          this.$modal.msgSuccess("导入成功");
+        }
+      });
     }
   }
 };

+ 89 - 15
src/views/zcustom/public/index.vue

@@ -36,6 +36,14 @@
           v-hasPermi="['zcustom:platPublicCar:remove']"
         >删除</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-upload"
+          size="mini"
+          @click="handleUpload"
+        >导入</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -57,7 +65,6 @@
       <el-table-column label="企业负责人用车数量" align="center" prop="headCarNum" />
       <el-table-column label="燃油车数量" align="center" prop="oilCarNum" />
       <el-table-column label="新能源车数量" align="center" prop="newPowerCarNum" />
-      <el-table-column label="公务车缺编数" align="center" prop="lackCarNum" />
       <el-table-column label="公务车编制数" align="center" prop="establishmentsCarNum" />
       <el-table-column label="公务车年度增加数" align="center" prop="yearAddNum" />
       <el-table-column label="公务车年度减少数" align="center" prop="yearReduceNum" />
@@ -136,9 +143,6 @@
         <el-form-item label="新能源车数量" prop="newPowerCarNum">
           <el-input v-model="form.newPowerCarNum" placeholder="请输入新能源车数量" />
         </el-form-item>
-        <el-form-item label="公务车缺编数" prop="lackCarNum">
-          <el-input v-model="form.lackCarNum" placeholder="请输入公务车缺编数" />
-        </el-form-item>
         <el-form-item label="公务车编制数" prop="establishmentsCarNum">
           <el-input v-model="form.establishmentsCarNum" placeholder="请输入公务车编制数" />
         </el-form-item>
@@ -187,16 +191,79 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="导入json" :visible.sync="op" :close-on-click-modal="false" width="600px" append-to-body>
+      <el-form ref="form" :rules="rules" label-width="80px">
+        <el-form-item label="json来源">
+          <el-select v-model="value" placeholder="请选择源接口">
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="json数据">
+          <el-input v-model="json" type="textarea" placeholder="请输入json数据" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="sure">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
-import { listPlatPublicCar, getPlatPublicCar, delPlatPublicCar, addPlatPublicCar, updatePlatPublicCar } from "@/api/zcustom/public";
+import {
+  listPlatPublicCar,
+  getPlatPublicCar,
+  delPlatPublicCar,
+  addPlatPublicCar,
+  updatePlatPublicCar,
+  uploadJson
+} from '@/api/zcustom/public'
 
 export default {
   name: "PlatPublicCar",
   data() {
     return {
+      value: null,
+      options:[
+        {
+          value: '1',
+          label: '资源台账-按照月度统计'
+        }, {
+          value: '2',
+          label: '资源台账-按照年度统计'
+        }, {
+          value: '3',
+          label: '资源台账-公务车实有数展开-1'
+        }, {
+          value: '4',
+          label: '资源台账-公务车实有数展开-2'
+        }, {
+          value: '5',
+          label: '资源台账-公务车实有数展开-3'
+        }, {
+          value: '6',
+          label: '运行管理-公务车派车单总数'
+        }, {
+          value: '7',
+          label: '监控管理-公务车终端安装率、在线率'
+        }, {
+          value: '8',
+          label: '监控管理-公务车处置未归档数量'
+        }, {
+          value: '9',
+          label: '监控管理-未带工单预警、超速预警数、节假日预警数'
+        }
+      ],
+      json: "",
+      op:false,
       // 根路径
       baseURL: process.env.VUE_APP_BASE_API,
       // 遮罩层
@@ -233,7 +300,6 @@ export default {
         headCarNum: null,
         oilCarNum: null,
         newPowerCarNum: null,
-        lackCarNum: null,
         establishmentsCarNum: null,
         yearAddNum: null,
         yearReduceNum: null,
@@ -253,6 +319,12 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        value: [
+          { required: true, message: "来源不能为空", trigger: "blur" }
+        ],
+        json: [
+          { required: true, message: "数据不能为空", trigger: "blur" }
+        ],
         id: [
           { required: true, message: "id不能为空", trigger: "blur" }
         ],
@@ -292,9 +364,6 @@ export default {
         newPowerCarNum: [
           { required: true, message: "新能源车数量不能为空", trigger: "blur" }
         ],
-        lackCarNum: [
-          { required: true, message: "公务车缺编数不能为空", trigger: "blur" }
-        ],
         establishmentsCarNum: [
           { required: true, message: "公务车编制数不能为空", trigger: "blur" }
         ],
@@ -344,6 +413,13 @@ export default {
     this.getList();
   },
   methods: {
+    sure(){
+      const jsonString = encodeURIComponent(JSON.stringify(this.json));
+      uploadJson(this.value, jsonString).then(res => {
+
+      })
+    },
+
     /** 查询公务用车列表 */
     getList() {
       this.loading = true;
@@ -356,6 +432,7 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false;
+      this.op = false;
       this.reset();
     },
     // 表单重置
@@ -374,7 +451,6 @@ export default {
         headCarNum: null,
         oilCarNum: null,
         newPowerCarNum: null,
-        lackCarNum: null,
         establishmentsCarNum: null,
         yearAddNum: null,
         yearReduceNum: null,
@@ -454,11 +530,9 @@ export default {
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('zcustom/platPublicCar/export', {
-        ...this.queryParams
-      }, `platPublicCar_${new Date().getTime()}.xlsx`)
+    /** 导入操作 */
+    handleUpload(){
+      this.op = true
     }
   }
 };