|
@@ -58,7 +58,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 编辑 -->
|
|
|
- <el-dialog :title="textMap[edit.dialogStatus]" :visible.sync="edit.dialogFormVisible" :close-on-click-modal="false" width="50%">
|
|
|
+ <el-dialog :title="textMap[edit.dialogStatus]" :visible.sync="edit.dialogFormVisible" :close-on-click-modal="false" @close="close" width="50%">
|
|
|
<div class="edit">
|
|
|
<el-form ref="temp" :rules="edit.rules" :model="edit.temp" label-position="right" label-width="150px" style="width: 100%;margin:0 auto 50px">
|
|
|
<el-row>
|
|
@@ -103,9 +103,12 @@
|
|
|
<el-row>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label="SIM卡号:" prop="simid">
|
|
|
- <el-select v-model="edit.temp.simid" filterable placeholder="SIM卡号" class="filter-item" style="width: 100%;">
|
|
|
+ <el-select v-model="edit.temp.simid" filterable placeholder="SIM卡号" class="filter-item" style="width: 100%;" v-if="edit.dialogStatus =='createTxt'">
|
|
|
<el-option v-for="item in simCardList" :key="item.id" :label="item.card" :value="item.id" />
|
|
|
</el-select>
|
|
|
+ <el-select v-model="edit.temp.simid" filterable placeholder="SIM卡号" class="filter-item" style="width: 100%;" v-else>
|
|
|
+ <el-option v-for="item in simCardEditList" :key="item.id" :label="item.card" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -120,7 +123,7 @@
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer" style="bottom: 10px;">
|
|
|
<el-button class="save" :disabled="isokDisable" @click="edit.dialogStatus =='createTxt'?createData():editData()">确认</el-button>
|
|
|
- <el-button class="cancelClose" @click="edit.dialogFormVisible = false; ">取消</el-button>
|
|
|
+ <el-button class="cancelClose" @click="close()">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog :title="textMap[see.dialogStatus]" :visible.sync="see.dialogFormVisible" :close-on-click-modal="false" width="50%">
|
|
@@ -168,6 +171,7 @@
|
|
|
pastureList:[], //牧场名称
|
|
|
cowshedList:[], //牛舍名称
|
|
|
simCardList:[], //SIM卡号
|
|
|
+ simCardEditList:[], //SIM卡号
|
|
|
table1:{
|
|
|
enableStatusList:[{id:1,name:'已启用'},{id:0,name:'未启用'}],
|
|
|
parammaps: {status: '', code:''},
|
|
@@ -204,6 +208,7 @@
|
|
|
this.getPastureList()
|
|
|
// this.getCowshedList()
|
|
|
this.getSimCardList()
|
|
|
+ this.getSimCardEditList()
|
|
|
},
|
|
|
methods: {
|
|
|
getList1() {
|
|
@@ -283,6 +288,20 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getSimCardEditList() {
|
|
|
+ let data = {
|
|
|
+ name:'getSim',
|
|
|
+ page: 1, offset: 1, pagecount: '', returntype: 'Map',
|
|
|
+ }
|
|
|
+ let url = 'authdata/GetDataByName'
|
|
|
+ postJson(url,data).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.simCardEditList = response.data.list
|
|
|
+ }else{
|
|
|
+ this.simCardEditList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
changePasture(item){
|
|
|
this.edit.temp.pasturecode = this.pastureList.find(obj => obj.pastureid === item).pasturecode
|
|
|
this.edit.temp.barid = ''
|
|
@@ -384,7 +403,12 @@
|
|
|
this.see.temp = Object.assign({}, row)
|
|
|
this.see.dialogFormVisible = true
|
|
|
this.see.dialogStatus = 'seeTxt'
|
|
|
- }
|
|
|
+ },
|
|
|
+ close(){
|
|
|
+ this.$refs['temp'].resetFields()
|
|
|
+ this.edit.dialogFormVisible = false
|
|
|
+ this.getList1()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|