Commit 37f3a3f7b87f5902843784ab901a336bfaa97747

Authored by xiaochaoqun
1 parent fb868b0b

修复月台部分bug,修改锁定月台功能

ant-design-vue-jeecg/src/api/api.js
... ... @@ -115,7 +115,7 @@ export const Platform = (params)=>postAction("/platformmanagement/platformManage
115 115 //释放月台
116 116 export const releasePlatform = (params)=>postAction("/platformmanagement/platformManagement/releasePlatform?id="+params);
117 117 //锁定月台
118   -export const bindPlatform = (params)=>postAction("/platformmanagement/platformManagement/bindPlatform?id="+params);
  118 +export const bindPlatform = (params)=>postAction("/platformmanagement/platformManagement/bindPlatform", params);
119 119  
120 120 // 中转HTTP请求
121 121 export const transitRESTful = {
... ...
ant-design-vue-jeecg/src/views/basics/platformmanagement/PlatformDetailsList.vue
... ... @@ -77,7 +77,7 @@
77 77 <a-popconfirm title="确定释放该月台吗?" @confirm="() => releaseClick(record.id)" v-if="record.state=='lock' || record.state=='reserve'">
78 78 <a>释放</a>
79 79 </a-popconfirm>
80   - <a-popconfirm title="确定绑定该月台吗?" @confirm="() => bindClcik(record.id)" v-if="record.state=='empty' ">
  80 + <a-popconfirm title="确定绑定该月台吗?" @confirm="() => bindClcik(record.id)" v-if="record.state=='empty' || record.state== null">
81 81 <a>绑定</a>
82 82 </a-popconfirm>
83 83 <a-divider type="vertical" />
... ... @@ -94,6 +94,16 @@
94 94 </div>
95 95  
96 96 <platformDetails-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></platformDetails-modal>
  97 + <j-popup
  98 + v-show="showRentPrise"
  99 + ref="find_car_number"
  100 + code="find_car_number"
  101 + :param="Param"
  102 + :trigger-change="true"
  103 + @callback="findCarNumberClick"
  104 + org-fields="phone_number"
  105 + dest-fields="phone_number"
  106 + field="popup"/>
97 107 </a-card>
98 108 </template>
99 109  
... ... @@ -115,6 +125,7 @@
115 125 export default {
116 126 name: "PlatformDetailsList",
117 127 mixins:[JeecgListMixin],
  128 + Param:{railway_platform:''},
118 129 components: { PlatformDetailsModal },
119 130 props:{
120 131 mainId:{
... ... @@ -140,6 +151,8 @@
140 151 return {
141 152 description: '月台管理页面',
142 153 disableMixinCreated:true,
  154 + model:{
  155 + },
143 156 // 表头
144 157 columns: [
145 158 {
... ... @@ -233,7 +246,17 @@
233 246 })
234 247 },
235 248 bindClcik(id){
236   - bindPlatform(id).then((res) => {
  249 + this.$refs.find_car_number.openModal();
  250 + this.model.id = id;
  251 +
  252 + },
  253 + findCarNumberClick(row){
  254 + let params = {
  255 + "id":this.model.id,
  256 + "carNumber":row.phone_number
  257 + }
  258 + debugger
  259 + bindPlatform(params).then((res) => {
237 260 if (res.success) {
238 261 this.$message.success(res.message);
239 262 this.loadData(1);
... ...
ant-design-vue-jeecg/src/views/basics/platformmanagement/modules/PlatformDetailsModal.vue
... ... @@ -12,7 +12,7 @@
12 12 <a-form-model ref="form" :model="model" :rules="validatorRules">
13 13 <a-row>
14 14 <a-col :span="24">
15   - <a-form-model-item v-if="model.code==null" label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
  15 + <a-form-model-item v-if="show" label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
16 16 <a-input v-model="model.code"placeholder="请输入编码"></a-input>
17 17 </a-form-model-item>
18 18 </a-col>
... ... @@ -32,7 +32,7 @@
32 32 </a-form-model-item>
33 33 </a-col>
34 34 <a-col :span="24">
35   - <a-form-model-item v-if="model.state== null" label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
  35 + <a-form-model-item v-if="show" label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
36 36 <j-dict-select-tag type="list" v-model="model.state" dictCode="platformstatus" placeholder="请选择状态" />
37 37 </a-form-model-item>
38 38 </a-col>
... ... @@ -63,6 +63,7 @@
63 63 title:"操作",
64 64 width:800,
65 65 visible: false,
  66 + show:true,
66 67 model:{
67 68 },
68 69 labelCol: {
... ... @@ -99,11 +100,14 @@
99 100 },
100 101 methods: {
101 102 add () {
102   - this.edit(this.modelDefault);
  103 + this.model = Object.assign({}, this.modelDefault);
  104 + this.visible = true;
  105 + this.show = true;
103 106 },
104 107 edit (record) {
105 108 this.model = Object.assign({}, record);
106 109 this.visible = true;
  110 + this.show = false;
107 111 },
108 112 close () {
109 113 this.$emit('close');
... ...
ant-design-vue-jeecg/src/views/basics/platformmanagement/modules/PlatformManagementModal.vue
... ... @@ -12,7 +12,7 @@
12 12 <a-form-model ref="form" :model="model" :rules="validatorRules">
13 13 <a-row>
14 14 <a-col :span="24">
15   - <a-form-model-item label="编码" v-if="model.code == null" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
  15 + <a-form-model-item label="编码" v-if="codeView == true" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
16 16 <a-input v-model="model.code" placeholder="请输入编码" ></a-input>
17 17 </a-form-model-item>
18 18 </a-col>
... ... @@ -66,6 +66,7 @@
66 66 title:"操作",
67 67 width:800,
68 68 visible: false,
  69 + codeView: false,
69 70 model:{
70 71 },
71 72 labelCol: {
... ... @@ -102,9 +103,12 @@
102 103 },
103 104 methods: {
104 105 add () {
105   - this.edit(this.modelDefault);
  106 + this.model = Object.assign({}, this.modelDefault);
  107 + this.visible = true;
  108 + this.codeView =true;
106 109 },
107 110 edit (record) {
  111 + this.codeView =false;
108 112 this.model = Object.assign({}, record);
109 113 this.visible = true;
110 114 },
... ...