|
@@ -4,6 +4,7 @@
|
|
|
<el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">新增车次
|
|
|
</el-button>
|
|
|
<el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">减少车次</el-button>
|
|
|
+ <el-button v-if="isRoleEdit" class="success" style="float: left;" @click="handleCheck">校验</el-button>
|
|
|
<el-button v-if="isRoleEdit" class="success" icon="el-icon-download" style="float:left;" @click="handleAutomaticGeneration">自动生成</el-button>
|
|
|
<el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" style="float: left;" class="success" @click="handleChangeOrder">更改顺序</el-button>
|
|
|
<div v-else style="float: left;margin-left: 10px;">
|
|
@@ -354,6 +355,25 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 校验 -->
|
|
|
+ <el-dialog :title="textMap[check.dialogStatus]" :destroy-on-close="true" :visible.sync="check.dialogFormVisible" :close-on-click-modal="false" width="30%">
|
|
|
+ <div class="check">
|
|
|
+ <p v-if="check.temp.isDistribution == 0">当前有未分配栏舍,未分配栏舍如下:</p>
|
|
|
+ <p v-else>已分配完:当前栏舍已分配完善</p>
|
|
|
+ <!-- {{ check.temp }} -->
|
|
|
+ <div v-for="(item,index) in check.temp.ftlist" :key="index">
|
|
|
+ <b v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">{{item.ftname}}:</b>
|
|
|
+ <span v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">
|
|
|
+ <span v-for="(item2,index2) in item.arrList" :key="index2">
|
|
|
+ {{item2.barname}}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer" style="bottom: 10px;">
|
|
|
+ <el-button class="save" @click="check.dialogFormVisible=false;">确认</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -421,7 +441,16 @@ export default {
|
|
|
automaticGeneration: '提示',
|
|
|
historyRecord: '历史记录',
|
|
|
create: '新增',
|
|
|
- update: '编辑'
|
|
|
+ update: '编辑',
|
|
|
+ check: '提示'
|
|
|
+ },
|
|
|
+ check: {
|
|
|
+ dialogFormVisible: false,
|
|
|
+ dialogStatus: '',
|
|
|
+ temp: {
|
|
|
+ ftlist:[],
|
|
|
+ isDistribution: ''
|
|
|
+ }
|
|
|
},
|
|
|
dialogFull: false,
|
|
|
isOrder: true,
|
|
@@ -1417,7 +1446,36 @@ export default {
|
|
|
const vue = this
|
|
|
var myComponent = () => import('./historyRecord.vue')
|
|
|
return vue.historyRecord.myComponent = myComponent
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleCheck() {
|
|
|
+ console.log('点击了校验')
|
|
|
+ this.check.dialogStatus = 'check'
|
|
|
+ this.check.dialogFormVisible = true
|
|
|
+ this.getCheckList()
|
|
|
+ },
|
|
|
+ getCheckList() {
|
|
|
+ const url = 'authdata/spillage'
|
|
|
+ const data = {
|
|
|
+ page: 1,
|
|
|
+ offset: 1,
|
|
|
+ pagecount: 0,
|
|
|
+ returntype: 'Map',
|
|
|
+ parammaps: {
|
|
|
+ pastureid: Cookies.get('pastureid'),
|
|
|
+ times: this.table.getdataListParm.parammaps.times,
|
|
|
+ refresh: 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ postJson(url, data).then(response => {
|
|
|
+ if (response.data.ftlist !== undefined && response.data.ftlist !== null) {
|
|
|
+ this.$set(this.check.temp,'isDistribution',0)
|
|
|
+ this.check.temp.ftlist = response.data.ftlist
|
|
|
+ } else {
|
|
|
+ this.check.temp = {}
|
|
|
+ this.$set(this.check.temp,'isDistribution',1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|