소스 검색

Merge branch 'master' of http://git.qiniu1314.com/cmy/jztStore

lhl 2 년 전
부모
커밋
9ec9cc1062
3개의 변경된 파일24개의 추가작업 그리고 21개의 파일을 삭제
  1. 1 1
      .env.dev
  2. 22 19
      src/pages/check/rule/add.vue
  3. 1 1
      src/setting.js

+ 1 - 1
.env.dev

@@ -8,4 +8,4 @@ VUE_APP_WS_KEFU_URL=''
 # socket 系统连接地址
 VUE_APP_WS_ADMIN_URL=''
 # 接口请求地址
-VUE_APP_API_URL='https://test.pro.wuht.net/storeapi'
+VUE_APP_API_URL='https://wx.junhailan.com/storeapi'

+ 22 - 19
src/pages/check/rule/add.vue

@@ -11,7 +11,7 @@
 					</template>
 					<Button type="primary" @click="chooseSatff">选择员工</Button>
 				</FormItem>
-				<FormItem label="打卡经度">
+				<!-- <FormItem label="打卡经度">
 					<Input v-model="formData.loc_infos[0].lng" v-width="320"></Input>
 					<span> (实际经度的1000000倍)</span>
 				</FormItem>
@@ -34,14 +34,9 @@
 				<FormItem label="无线路由器MAC地址">
 					<Input v-model="formData.wifimac_infos[0].wifimac" v-width="320"></Input>
 					<span> </span>
-				</FormItem>
-				<card v-for="(itemx,indexx) in formData.checkindate" style="width:1000px;">
-					<div style="padding-bottom: 10px;">打卡时间
-						<Button type="primary" style="margin-left: 20px;" @click="addNewDkTime()"
-							v-if="indexx == 0">添加新打卡时间</Button>
-						<Button type="primary" style="margin-left: 20px;" @click="delNewDkTime(indexx)"
-							v-else>删除</Button>
-					</div>
+				</FormItem> -->
+				<card class="day_box" v-for="(itemx,indexx) in formData.checkindate">
+					<div class="title">打卡设置</div>
 					<FormItem label="工作日" required>
 						<TagSelect v-model="itemx.workdays" hide-check-all>
 							<TagSelectOption :name="1">星期一</TagSelectOption>
@@ -53,14 +48,10 @@
 							<TagSelectOption :name="0">星期天</TagSelectOption>
 						</TagSelect>
 					</FormItem>
-					<card v-for="(item,index) in itemx.checkintime" style="margin-bottom: 10px;">
-						<FormItem label="时段id" required>
+					<card class="time_box"  v-for="(item,index) in itemx.checkintime">
+						<!-- <FormItem label="时段id" required>
 							<Input v-width="320" placeholder="大于0,小于99999,且唯一" v-model="item.time_id"></Input>
-							<Button type="primary" style="margin-left: 20px;" @click="addNewDk(itemx)"
-								v-if="index == 0">添加新上班时段</Button>
-							<Button type="primary" style="margin-left: 20px;" @click="delNewDk(itemx,index)"
-								v-else>删除</Button>
-						</FormItem>
+						</FormItem> -->
 						<FormItem label="上班时间" required>
 							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
 								v-model="item.work_sec" />
@@ -96,11 +87,15 @@
 							<TimePicker :steps="[1, 5]" placeholder="" v-width="320" format="HH:mm"
 								v-model="item.latest_off_work_sec" />
 						</FormItem>
-						
+						<Button type="primary" style="margin-left: 20px;" @click="delNewDk(itemx.checkintime,index)"
+							v-if="itemx.checkintime.length>1">删除</Button>
 					</card>
+					<Button type="primary" style="margin-left: 20px;" @click="addNewDk(itemx)"
+						>添加新上班时段</Button>
+					<Button type="primary" @click="delNewDkTime(indexx)"
+						v-if="indexx>0">删除当前组</Button>
 				</card>
-
-
+			<Button type="primary" style="margin-top: 20px;" @click="addNewDkTime()">添加新打卡日期</Button>
 			</Form>
 			<div style="width: 500px; display: flex;justify-content: center;">
 				<Button type="primary" class="submission" @click="save" :disabled="disabled"
@@ -253,6 +248,7 @@
 				this.formData.checkindate.splice(index, 1)
 			},
 			delNewDk(item,index) {
+				console.log(item,'itemx')
 				item.splice(index, 1)
 			},
 			// 
@@ -524,4 +520,11 @@
 	/deep/.vxe-tree-cell {
 		padding-left: 0 !important;
 	}
+	.day_box{
+		margin-bottom: 20px
+		min-width: 1000px
+		.time_box{
+			margin-bottom: 20px
+		}
+	}
 </style>

+ 1 - 1
src/setting.js

@@ -11,7 +11,7 @@
  * iView store Pro 业务配置
  * */
 // 请求接口地址 如果没有配置自动获取当前网址路径
-const VUE_APP_API_URL = 'https://wx.junhailan.com/storeapi' || `${location.origin}/storeapi`;
+const VUE_APP_API_URL = process.env.VUE_APP_API_URL || `${location.origin}/storeapi`;
 // 管理端ws
 const VUE_APP_WS_ADMIN_URL = process.env.VUE_APP_WS_ADMIN_URL || `ws:${location.hostname}/ws`
 // 路由前缀