|
@@ -35,9 +35,6 @@
|
|
<el-form-item style="float:right;">
|
|
<el-form-item style="float:right;">
|
|
<el-button type="primary" @click="showChangeIp()">{{$t('runTest.changeIp')}}</el-button>
|
|
<el-button type="primary" @click="showChangeIp()">{{$t('runTest.changeIp')}}</el-button>
|
|
</el-form-item>
|
|
</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-form-item style="float: right;">
|
|
<el-button type="primary" @click="issued">{{$t('base.issued')}}</el-button>
|
|
<el-button type="primary" @click="issued">{{$t('base.issued')}}</el-button>
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
@@ -81,12 +78,13 @@
|
|
<span v-else-if="scope.row.isUse == 3">{{$t('basic.state3')}}</span>
|
|
<span v-else-if="scope.row.isUse == 3">{{$t('basic.state3')}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</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">
|
|
<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 == 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>
|
|
<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" -->
|
|
<!-- :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" :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>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -254,6 +252,8 @@
|
|
}
|
|
}
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
|
|
+ user: JSON.parse(sessionStorage.getItem("user")),
|
|
|
|
+
|
|
allocations: [],
|
|
allocations: [],
|
|
companies: {},
|
|
companies: {},
|
|
newAllocation: {
|
|
newAllocation: {
|
|
@@ -723,14 +723,18 @@
|
|
},
|
|
},
|
|
|
|
|
|
//清除数据
|
|
//清除数据
|
|
- clearData() {
|
|
|
|
|
|
+ clearData(id) {
|
|
var _this = this;
|
|
var _this = this;
|
|
this.$confirm(this.$t('basic.isClearData'), this.$t('el.messagebox.title'), {
|
|
this.$confirm(this.$t('basic.isClearData'), this.$t('el.messagebox.title'), {
|
|
confirmButtonText: this.$t('el.messagebox.confirm'),
|
|
confirmButtonText: this.$t('el.messagebox.confirm'),
|
|
cancelButtonText: this.$t('el.messagebox.cancel'),
|
|
cancelButtonText: this.$t('el.messagebox.cancel'),
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.http.post( this.port.base.clearData , {},
|
|
|
|
|
|
+ this.http.post( this.port.base.clearData , {
|
|
|
|
+ equipmentNo: id,
|
|
|
|
+ uid: this.user.id,
|
|
|
|
+ state: 0,
|
|
|
|
+ },
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|