|
|
@@ -67,36 +67,10 @@
|
|
|
<i class="el-icon-edit cursor" @click="dialogControl('种植作物', 'CropsDialog')"></i>
|
|
|
</span>
|
|
|
</li>
|
|
|
- <li v-if="userType == 1">
|
|
|
- <span style="height: 28px;" class="item-label">识别:</span>
|
|
|
- <span class="item-content">
|
|
|
- <el-select
|
|
|
- @change="operationDiscern($event, cardItem.imei, cardItem.disable)"
|
|
|
- class="my-el-select"
|
|
|
- size="small"
|
|
|
- v-model="cardItem.disable"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="itemA in insectOptions"
|
|
|
- :key="itemA.value"
|
|
|
- :label="itemA.label"
|
|
|
- :value="itemA.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </span>
|
|
|
- </li>
|
|
|
- <li v-if="userType == 1">
|
|
|
- <span class="item-label">销售用户:</span
|
|
|
- ><span class="item-content">{{ cardItem.sale_user || '无' }}</span>
|
|
|
- </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<p class="btns">
|
|
|
- <button v-if="$QueryPermission(61)" @click="viewImage(cardItem)">
|
|
|
- 查看图片
|
|
|
- </button>
|
|
|
+ <button v-if="$QueryPermission(61)" @click="viewImage(cardItem)">查看图片</button>
|
|
|
<button v-if="$QueryPermission(62)" @click="dialogControl('设备控制', 'EquipDialog', '50%')">
|
|
|
设备控制
|
|
|
</button>
|
|
|
@@ -184,7 +158,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- userType: function() {
|
|
|
+ userType: function () {
|
|
|
// 获取用户类型
|
|
|
return window.sessionStorage.getItem('myuser_type')
|
|
|
},
|
|
|
@@ -220,7 +194,7 @@ export default {
|
|
|
method: 'POST',
|
|
|
url: '/api/api_gateway?method=user.login.get_identify_model'
|
|
|
// token: localStorage.getItem("session"),
|
|
|
- }).then(res => {
|
|
|
+ }).then((res) => {
|
|
|
// console.log('显示哪个模块', res);
|
|
|
if (res.status == 200) {
|
|
|
let identify_model = res.data.data.identify_model
|
|
|
@@ -243,24 +217,24 @@ export default {
|
|
|
if (val == 0) {
|
|
|
// 当前处于识别关闭状态
|
|
|
this.$confirm('确认关闭识别状态?')
|
|
|
- .then(_ => {
|
|
|
+ .then((_) => {
|
|
|
this.operationDiscernAxios(id, 'disable')
|
|
|
})
|
|
|
- .catch(_ => {})
|
|
|
+ .catch((_) => {})
|
|
|
} else if (val == 1) {
|
|
|
// 当前处于识别开启状态
|
|
|
this.$confirm('确认开启识别状态?')
|
|
|
- .then(_ => {
|
|
|
+ .then((_) => {
|
|
|
this.operationDiscernAxios(id, 'enable')
|
|
|
})
|
|
|
- .catch(_ => {})
|
|
|
+ .catch((_) => {})
|
|
|
} else if (val == 2) {
|
|
|
// 当前处于识别开启状态
|
|
|
this.$confirm('确认开启计数状态?')
|
|
|
- .then(_ => {
|
|
|
+ .then((_) => {
|
|
|
this.operationDiscernAxios(id, 'count')
|
|
|
})
|
|
|
- .catch(_ => {})
|
|
|
+ .catch((_) => {})
|
|
|
}
|
|
|
},
|
|
|
operationDiscernAxios(id, req) {
|
|
|
@@ -275,12 +249,12 @@ export default {
|
|
|
ret: req // ret=disable时禁用识别功能, ret=enable,时启用识别统计功能
|
|
|
})
|
|
|
})
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.data == true) {
|
|
|
that.updateList() // 图片列表数据请求
|
|
|
}
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
+ .catch((err) => {
|
|
|
console.log(err)
|
|
|
this.$message.error('操作失败,请重试!')
|
|
|
})
|