Browse Source

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

keyman1995 6 years ago
parent
commit
6ae5f11981

+ 2
- 2
config/index.js View File

@@ -12,8 +12,8 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 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 17
         // target: 'http://localhost:8080', //wf
18 18
         // target: 'http://192.168.0.11', //ys
19 19
         // target: 'http://192.168.0.125:8080', //hyq

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

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

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

@@ -72,6 +72,15 @@
72 72
             </div>
73 73
           </div>
74 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 84
         <li class="flex-h">
76 85
           <span>左击地图获取经纬度:<em>*</em></span>
77 86
           <div class="flex-item" style="margin-left: 10px;">
@@ -126,6 +135,7 @@ export default {
126 135
         CreatDate: '', // 创建日期
127 136
         CreatUser: '', // 创建人
128 137
       },
138
+      switchValue: false, // 控制开关, 对应 postData.Status 字段 0=false, 1=true, 默认值 false
129 139
       markers: [],
130 140
       searchOption: {
131 141
         city: '南京',
@@ -158,6 +168,11 @@ export default {
158 168
         urlData: { id: this.$route.query.id }
159 169
       }).then(res => {
160 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 178
     handleAvatarSuccess (res, file) {
@@ -209,6 +224,7 @@ export default {
209 224
         })
210 225
         return false
211 226
       }
227
+      this.postData.Status = this.switchValue === false ? 0 : 1 // 是否开放状态
212 228
       this.postData.OrgId = this.OrgId
213 229
       this.$ajax(this.$api.caseManager.addCase.url, {
214 230
         method: this.$api.caseManager.addCase.method,