zhangdan 4 éve
szülő
commit
3a8ced6de4

+ 3 - 2
src/views/cleanManage/cleanDetail.vue

@@ -72,8 +72,9 @@
       bordered
     >
       <span slot="action" slot-scope="text,record">
-        <a-button type="primary" @click="handleDetail(record)" v-hasPermission="'B_cleanDetail'">查看清运明细</a-button>
-		<span v-if="!$hasPermissions('B_cleanDetail')">--</span>
+        <a-button type="primary" @click="handleDetail(record)" v-hasPermission="'B_cleanDetail'" id="cleanDetail-handleDetail">查看清运明细</a-button>
+        <span v-if="!$hasPermissions('B_cleanDetail')">--</span>
+        <!-- <a-button type="primary" @click="handleDetail(record)" >查看清运明细</a-button> -->
       </span>
     </s-table>
     <!-- 详情弹窗 -->

+ 1 - 0
src/views/cleanManage/cleanDetailModal.vue

@@ -1,6 +1,7 @@
 <template>
   <a-modal title="清运详情" :footer="null" v-model="isShow" @cancel="cancel" centered>
     <div class="detail-item" v-for="item in itemData" :key="item.index"><span>{{ item.rubbishType }}:</span>{{ (item.cleanWeight/1000).toFixed(2) }} kg</div>
+    <div><a-empty v-if="itemData.length == 0" style="text-align: center;" /></div>
   </a-modal>
 </template>
 

+ 1 - 2
src/views/cleanManage/cleanModal.vue

@@ -82,7 +82,7 @@ export default {
     // 保存
     handleSubmit () {
       this.$refs.ruleForm.validate(valid => {
-			const _this = this
+        const _this = this
         if (valid) {
           const params = {
             stationNo: this.stationNo,
@@ -91,7 +91,6 @@ export default {
             remarks: this.queryParam.remarks
           }
           cleanByDevice(params).then(res => {
-            console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('refresh')

+ 1 - 0
src/views/cleanManage/netWorkCleanRecord.vue

@@ -55,6 +55,7 @@
       bordered
     >
       <span slot="action" slot-scope="text,record">
+        <!-- <a-button type="primary" @click="handleDetail(record)" id="netWorkCleanRecord-handleDetail">查看详情</a-button> -->
         <a-button type="primary" @click="handleDetail(record)" v-hasPermission="'B_netWorkCleanRecord_detail'" id="netWorkCleanRecord-handleDetail">查看详情</a-button>
         <span v-if="!$hasPermissions('B_netWorkCleanRecord_detail')">--</span>
       </span>

+ 22 - 5
src/views/cleanManage/notCleanNetwork.vue

@@ -134,6 +134,7 @@
       <!-- 操作 -->
       <span slot="action" slot-scope="text,record">
         <a-button type="primary" @click="handleDetail(record)" v-hasPermission="'B_notCleanNetwork_edit'" id="notCleanNetwork-handleDetail">立即清运</a-button>
+        <!-- <a-button type="primary" @click="handleDetail(record)" id="notCleanNetwork-handleDetail">立即清运</a-button> -->
         <span v-if="!$hasPermissions('B_notCleanNetwork_edit')">--</span>
       </span>
     </s-table>
@@ -142,6 +143,7 @@
       :stationNo="itemStationNo"
       :deviceNo="itemDeviceNo"
       :openModal="isOpenModal"
+      @refresh="refreshTable"
       @close="closeCleanModal"></cleanModal>
   </a-card>
 </template>
@@ -302,8 +304,8 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.time && this.time.length) {
-          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginDate = null
           searchData.endDate = null
@@ -314,6 +316,12 @@ export default {
               const _item = res.data.list[i]
               //  找出可回收垃圾库存量最大的值
               const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.metPla, _item.glass, _item.recycling]
+              if (arr) {
+              	arr.some(item => {
+              		const isTrue = item != 0
+                  console.log(isTrue)
+              	})
+              }
               const maxVal = Math.max(...arr)
               _item.maxVal = maxVal
             }
@@ -348,6 +356,16 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 编辑后刷新列表
+    refreshTable () {
+	  // 编辑
+	  if (this.itemStationNo && this.itemDeviceNo) {
+	    this.$refs.table.refresh()
+	  } else {
+	    // 保存
+	    this.$refs.table.refresh(true)
+	  }
+    },
     // 获取网点数据
     getStationList () {
       stationList().then(res => {
@@ -413,8 +431,8 @@ export default {
     getTotal () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = null
         params.endDate = null
@@ -423,7 +441,6 @@ export default {
         if (res.status == 200) {
           this.recyclableWasteTotal = (res.data.totalWeight / 1000).toFixed(2) || 0
           this.wastePaper = (res.data.paper / 1000).toFixed(2) || 0
-
           this.wasteClothes = (res.data.clothes / 1000).toFixed(2) || 0
           this.wasteMetal = (res.data.metal / 1000).toFixed(2) || 0
           this.wastePlastics = (res.data.plastic / 1000).toFixed(2) || 0

+ 0 - 15
src/views/equipmentManage/electronicScale/addElectronicScale.vue

@@ -70,31 +70,16 @@ export default {
 	      srcDeviceCode: _this.deviceCode
 	    }).then(res => {
 	      if (res.status == 200) {
-	      console.log(res, '-------------返回数据')
 	  	  _this.formData = Object.assign({}, this.formData, res.data)
 	  	  _this.formData.loginFlag = Number(this.formData.loginFlag)
-	  	  // this.formData.loginFlag
-	  	  // console.log(this.formData, '-----------数据')
-	        // this.form.setFieldsValue({
-	        //   'formData': res.data
-	        // })
-	        // this.formData.setFieldsValue({ 'formData.loginFlag': Number(res.data.loginFlag) })
-	        // this.formData.setFieldsValue({ 'formData.name': res.data.name })
-	        // this.formData.setFieldsValue({ 'formData.phone': res.data.phone })
-	        // this.form.setFieldsValue({ 'formData.sex': res.data.sex })
-	        // this.form.setFieldsValue({ 'formData.org.name': res.data.org.name })
-	        // this.form.setFieldsValue({ 'formData.remarks': res.data.remarks })
 	      }
 	    })
 	  },
     handleSubmit () {
       this.$refs.ruleForm.validate(valid => {
         const _this = this
-        console.log(valid, '--------------提交')
         if (valid) {
-	      console.log(valid, '--------------提交', this.formData)
 	      const params = JSON.parse(JSON.stringify(this.formData))
-	  	console.log(params)
 	      saveDevice(params).then(res => {
 	        console.log(res, 'rrrrrrrrr')
 	        if (res.status == 200) {

+ 6 - 3
src/views/equipmentManage/electronicScale/electronicScale.vue

@@ -5,8 +5,8 @@
       <a-form-model :model="searchForm" layout="inline" ref="searchForm" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="24">
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
-            <a-form-model-item label="设备MAC" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
-              <a-input v-model="searchForm.macAddress" placeholder="请输入设备MAC" :maxLength="12" allowClear id="electronicScale-macAddress"/>
+            <a-form-model-item label="设备MAC地址" :label-col="{ span: 7 }" :wrapper-col="{ span: 17 }">
+              <a-input v-model="searchForm.macAddress" placeholder="请输入设备MAC地址" :maxLength="12" allowClear id="electronicScale-macAddress"/>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
@@ -18,6 +18,7 @@
     </div>
     <!-- 新增 -->
     <div class="electronicScale-container-add"><a-button type="primary" icon="plus" @click="openModal" id="electronicScale-openModal" v-hasPermission="'B_electronicScale_add'">新增</a-button></div>
+    <!-- <div class="electronicScale-container-add"><a-button type="primary" icon="plus" @click="openModal" id="electronicScale-openModal">新增</a-button></div> -->
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
       <div class="ftext" slot="message">
@@ -31,6 +32,8 @@
         <a-icon type="qrcode" title="二维码" class="actionBtn icon-green" @click="getQrCode(record)" />
         <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" v-hasPermission="'B_electronicScale_edit'"/>
         <a-icon type="delete" title="删除" class="actionBtn icon-red" @click="delect(record)" v-hasPermission="'B_electronicScale_del'"/>
+        <!-- <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)"/>
+        <a-icon type="delete" title="删除" class="actionBtn icon-red" @click="delect(record)"/> -->
       </span>
       <span v-if="!($hasPermissions('B_electronicScale_edit') && $hasPermissions('B_electronicScale_del'))">--</span>
     </s-table>
@@ -75,7 +78,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center' },
-        { title: '设备MAC', dataIndex: 'macAddress', width: 100, align: 'center' },
+        { title: '设备MAC地址', dataIndex: 'macAddress', width: 100, align: 'center' },
         {
           title: '设备名称',
           dataIndex: 'deviceName',