Browse Source

案场信息 添加/编辑 添加是否开放控制

keyman1995 6 years ago
parent
commit
6ae5f11981

+ 2
- 2
config/index.js View File

12
     proxyTable: {
12
     proxyTable: {
13
       '/api': {
13
       '/api': {
14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
-        target: 'http://192.168.0.62:8080', //wf
16
-        // target: 'http://127.0.0.1:8080', 
15
+        // target: 'http://192.168.0.62:8080', //wf
16
+         target: 'http://127.0.0.1:8080', 
17
         // target: 'http://localhost:8080', //wf
17
         // target: 'http://localhost:8080', //wf
18
         // target: 'http://192.168.0.11', //ys
18
         // target: 'http://192.168.0.11', //ys
19
         // target: 'http://192.168.0.125:8080', //hyq
19
         // target: 'http://192.168.0.125:8080', //hyq

+ 12
- 1
src/pages/system/caseManager/caseInfo/addCase/index.vue View File

76
             </div>
76
             </div>
77
           </div>
77
           </div>
78
         </li>
78
         </li>
79
+        <li class="flex-h">
80
+          <span>是否开放:<em>*</em></span>
81
+          <div class="flex-item">
82
+            <el-switch
83
+              v-model="switchValue"
84
+              active-color="#13ce66">
85
+            </el-switch>
86
+          </div>
87
+        </li>
79
         <li class="flex-h">
88
         <li class="flex-h">
80
           <span>左击地图获取经纬度:<em>*</em></span>
89
           <span>左击地图获取经纬度:<em>*</em></span>
81
           <div class="flex-item" style="margin-left: 10px;">
90
           <div class="flex-item" style="margin-left: 10px;">
126
         CaseAddress: '', // 案场地址
135
         CaseAddress: '', // 案场地址
127
         CaseTel: '', // 案场电话
136
         CaseTel: '', // 案场电话
128
         Coordinate: '', // 经纬度
137
         Coordinate: '', // 经纬度
129
-        Status: '0', // 状态  0表示未开放, 1表示已开放
138
+        Status: '0', // 状态  0表示未开放, 1表示已开放, 默认值 0
130
         CreatDate: '', // 创建日期
139
         CreatDate: '', // 创建日期
131
         CreatUser: '', // 创建人
140
         CreatUser: '', // 创建人
132
       },
141
       },
142
+      switchValue: false, // 控制开关, 对应 postData.Status 字段 0=false, 1=true, 默认值 false
133
       markers: [],
143
       markers: [],
134
       searchOption: {
144
       searchOption: {
135
         city: '南京',
145
         city: '南京',
202
         })
212
         })
203
         return false
213
         return false
204
       }
214
       }
215
+      this.postData.Status = this.switchValue === false ? 0 : 1 // 是否开放状态
205
       this.postData.OrgId = this.OrgId
216
       this.postData.OrgId = this.OrgId
206
       this.$ajax(this.$api.caseManager.addCase.url, {
217
       this.$ajax(this.$api.caseManager.addCase.url, {
207
         method: this.$api.caseManager.addCase.method,
218
         method: this.$api.caseManager.addCase.method,

+ 16
- 0
src/pages/system/caseManager/caseInfo/editCase/index.vue View File

72
             </div>
72
             </div>
73
           </div>
73
           </div>
74
         </li>
74
         </li>
75
+        <li class="flex-h">
76
+          <span>是否开放:<em>*</em></span>
77
+          <div class="flex-item">
78
+            <el-switch
79
+              v-model="switchValue"
80
+              active-color="#13ce66">
81
+            </el-switch>
82
+          </div>
83
+        </li>
75
         <li class="flex-h">
84
         <li class="flex-h">
76
           <span>左击地图获取经纬度:<em>*</em></span>
85
           <span>左击地图获取经纬度:<em>*</em></span>
77
           <div class="flex-item" style="margin-left: 10px;">
86
           <div class="flex-item" style="margin-left: 10px;">
126
         CreatDate: '', // 创建日期
135
         CreatDate: '', // 创建日期
127
         CreatUser: '', // 创建人
136
         CreatUser: '', // 创建人
128
       },
137
       },
138
+      switchValue: false, // 控制开关, 对应 postData.Status 字段 0=false, 1=true, 默认值 false
129
       markers: [],
139
       markers: [],
130
       searchOption: {
140
       searchOption: {
131
         city: '南京',
141
         city: '南京',
158
         urlData: { id: this.$route.query.id }
168
         urlData: { id: this.$route.query.id }
159
       }).then(res => {
169
       }).then(res => {
160
         this.postData = res
170
         this.postData = res
171
+        if (this.postData.Status === 0) {
172
+          this.switchValue = false
173
+        } else {
174
+          this.switchValue = true // 是否开放状态
175
+        }
161
       })
176
       })
162
     },
177
     },
163
     handleAvatarSuccess (res, file) {
178
     handleAvatarSuccess (res, file) {
209
         })
224
         })
210
         return false
225
         return false
211
       }
226
       }
227
+      this.postData.Status = this.switchValue === false ? 0 : 1 // 是否开放状态
212
       this.postData.OrgId = this.OrgId
228
       this.postData.OrgId = this.OrgId
213
       this.$ajax(this.$api.caseManager.addCase.url, {
229
       this.$ajax(this.$api.caseManager.addCase.url, {
214
         method: this.$api.caseManager.addCase.method,
230
         method: this.$api.caseManager.addCase.method,