Ver Fonte

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

wutt há 5 anos atrás
pai
commit
c66ec982db
2 ficheiros alterados com 11 adições e 7 exclusões
  1. 1 1
      ys_int/src/port.js
  2. 10 6
      ys_int/src/views/base/allocation.vue

+ 1 - 1
ys_int/src/port.js

@@ -115,7 +115,7 @@ export default {
         openingAndClosingTimesChartCycle: '/mouldhistory/openingAndClosingTimesChartCycle', //获取云模盒的每日开合次数周期 (时间/次数)
         exportExcel: '/mouldhistory/exportExcel', // 导出excel
 
-        clearData: '/mouldhistory/clearData',       //清除数据
+        clearData: '/mould-down-packet/sendCommand',       //清除数据
     },
     file: {
         view: '/pdffile/getPdfFile' // 文件预览

+ 10 - 6
ys_int/src/views/base/allocation.vue

@@ -35,9 +35,6 @@
                 <el-form-item style="float:right;">
 					<el-button type="primary" @click="showChangeIp()">{{$t('runTest.changeIp')}}</el-button>
 				</el-form-item>
-                <el-form-item style="float: right;">
-                    <el-button type="primary" @click="clearData">{{$t('basic.clearData')}}</el-button>
-                </el-form-item>
                 <!-- <el-form-item style="float: right;">
                     <el-button type="primary" @click="issued">{{$t('base.issued')}}</el-button>
                 </el-form-item> -->
@@ -81,12 +78,13 @@
                     <span v-else-if="scope.row.isUse == 3">{{$t('basic.state3')}}</span>
                 </template>
             </el-table-column>
-            <el-table-column fixed="right" :label="$t('base.operate')" align="center" width="160">
+            <el-table-column fixed="right" :label="$t('base.operate')" align="center" width="240">
                 <template slot-scope="scope">
                     <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 0" type="primary" @click="openEnable(scope.$index)">{{$t('basic.use')}}</el-button>
                     <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 1" type="danger" @click="disableEquipment(scope.$index)">{{$t('basic.disuse')}}</el-button>
                     <!--  :disabled="scope.row.isUse == 1" -->
                     <el-button size="small" :style="scope.row.modelNo!=null?(parseInt(scope.row.isUse)>=2?'float:right;margin-right:6px':''):'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('base.edit')}}</el-button>
+                    <el-button size="small" type="danger" @click="clearData(scope.row.id)">{{$t('basic.clearData')}}</el-button>
                 </template>
             </el-table-column>
         </el-table>
@@ -254,6 +252,8 @@
                 }
             };
             return {
+                user: JSON.parse(sessionStorage.getItem("user")),
+                
                 allocations: [],
                 companies: {},
                 newAllocation: {
@@ -723,14 +723,18 @@
             },
 
             //清除数据
-            clearData() {
+            clearData(id) {
                 var _this = this;
                 this.$confirm(this.$t('basic.isClearData'), this.$t('el.messagebox.title'), {
                     confirmButtonText: this.$t('el.messagebox.confirm'),
                     cancelButtonText: this.$t('el.messagebox.cancel'),
                     type: 'warning'
                 }).then(() => {
-                    this.http.post( this.port.base.clearData , {},
+                    this.http.post( this.port.base.clearData , {
+                        equipmentNo: id,
+                        uid: this.user.id,
+                        state: 0,
+                    },
                     res => {
                         if (res.code == "ok") {
                             this.$message({