|
|
@@ -26,12 +26,12 @@
|
|
|
<!-- 重复配置 -->
|
|
|
<uni-section title="重复配置" padding="16px" type="line">
|
|
|
<uni-forms-item label="重复周期类型" required name="repeatCategory">
|
|
|
- <uni-data-select :localdata="repeatCategoryCheckBoxData"
|
|
|
+ <uni-data-select :localdata="repeatCategorySelectedData"
|
|
|
v-model="taskFormData.repeatCategory"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="自定义重复日" required name="repeatCustomDay"
|
|
|
v-if="taskFormData.repeatCategory == REPEAT_CATEGORY.CUSTOM">
|
|
|
- <uni-data-checkbox multiple :localdata="repeatCustomDayCheckBoxData"
|
|
|
+ <uni-data-checkbox multiple :localdata="repeatCustomDaySelectedData"
|
|
|
v-model="taskFormData.repeatCustomDay"></uni-data-checkbox>
|
|
|
</uni-forms-item>
|
|
|
</uni-section>
|
|
|
@@ -39,11 +39,11 @@
|
|
|
<!-- 打卡配置 -->
|
|
|
<uni-section title="打卡配置" padding="16px" type="line">
|
|
|
<uni-forms-item label="打卡方式" required name="punchInMethod">
|
|
|
- <uni-data-select :localdata="punchInMethodCheckBoxData" v-model="taskFormData.punchInMethod"></uni-data-select>
|
|
|
+ <uni-data-select :localdata="punchInMethodSelectedData" v-model="taskFormData.punchInMethod"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="判断规则" required name="compareRule"
|
|
|
v-if="taskFormData.punchInMethod == PUNCH_IN_METHOD.COUNT || taskFormData.punchInMethod == PUNCH_IN_METHOD.TIMING">
|
|
|
- <uni-data-select :localdata="compareRuleCheckBoxData" v-model="taskFormData.compareRule"></uni-data-select>
|
|
|
+ <uni-data-select :localdata="compareRuleSelectedData" v-model="taskFormData.compareRule"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="数值" required name="countTrack" v-if="taskFormData.punchInMethod == PUNCH_IN_METHOD.COUNT">
|
|
|
<uni-easyinput v-model="taskFormData.countTrack" placeholder="请输入目标数值" type="digit" />
|
|
|
@@ -61,7 +61,7 @@
|
|
|
<uni-easyinput v-model="taskFormData.points" placeholder="请输入奖励积分(基本)" type="number" />
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="额外奖励方式" required name="extraMethod">
|
|
|
- <uni-data-select :localdata="extraMethodCheckBoxData" v-model="taskFormData.extraMethod"></uni-data-select>
|
|
|
+ <uni-data-select :localdata="extraMethodSelectedData" v-model="taskFormData.extraMethod"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="额外的时间间隔(单位:分钟)" required name="extraTimeStep"
|
|
|
v-if="taskFormData.extraMethod != EXTRA_METHOD.NONE && taskFormData.punchInMethod == PUNCH_IN_METHOD.TIMING">
|
|
|
@@ -93,7 +93,7 @@
|
|
|
<uni-section title="节假日配置" padding="16px" type="line">
|
|
|
<uni-forms-item label="节假日双倍" required name="holidayStatus">
|
|
|
<uni-data-select v-model="taskFormData.holidayStatus"
|
|
|
- :localdata="commonEnabledStatusCheckBoxData"></uni-data-select>
|
|
|
+ :localdata="commonEnabledStatusSelectedData"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="数值(节假日)" required name="holidayCountTrack"
|
|
|
v-if="taskFormData.holidayStatus == COMMON_ENABLED_STATUS.ENABLED && taskFormData.punchInMethod == PUNCH_IN_METHOD.COUNT">
|
|
|
@@ -111,11 +111,11 @@
|
|
|
<uni-section title="全勤配置" padding="16px" type="line">
|
|
|
<uni-forms-item label="全勤双倍" required name="fullAttendanceStatus">
|
|
|
<uni-data-select v-model="taskFormData.fullAttendanceStatus"
|
|
|
- :localdata="commonEnabledStatusCheckBoxData"></uni-data-select>
|
|
|
+ :localdata="commonEnabledStatusSelectedData"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="全勤周期" required name="fullAttendancePeriod"
|
|
|
v-if="taskFormData.fullAttendanceStatus == COMMON_ENABLED_STATUS.ENABLED">
|
|
|
- <uni-data-select :localdata="fullAttendancePeriodCheckBoxData"
|
|
|
+ <uni-data-select :localdata="fullAttendancePeriodSelectedData"
|
|
|
v-model="taskFormData.fullAttendancePeriod"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="容错次数" required name="fullAttendancefaulttoleranceCnt"
|
|
|
@@ -127,7 +127,7 @@
|
|
|
<!-- 连续规则配置 -->
|
|
|
<uni-section title="连续规则配置" padding="16px" type="line">
|
|
|
<uni-forms-item label="是否启用连续规则" required name="continueStatus">
|
|
|
- <uni-data-select :localdata="commonEnabledStatusCheckBoxData"
|
|
|
+ <uni-data-select :localdata="commonEnabledStatusSelectedData"
|
|
|
v-model="taskFormData.continueStatus"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="宽限期(单位:天)" required name="graceDay"
|
|
|
@@ -150,11 +150,11 @@
|
|
|
<uni-datetime-picker type="date" return-type="date" v-model="taskFormData.endDate" />
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="是否启用自动打卡" required name="autoStatus">
|
|
|
- <uni-data-select :localdata="commonEnabledStatusCheckBoxData"
|
|
|
+ <uni-data-select :localdata="commonEnabledStatusSelectedData"
|
|
|
v-model="taskFormData.autoStatus"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="是否启用任务积分计算" required name="taskPointsStatus">
|
|
|
- <uni-data-select :localdata="commonEnabledStatusCheckBoxData"
|
|
|
+ <uni-data-select :localdata="commonEnabledStatusSelectedData"
|
|
|
v-model="taskFormData.taskPointsStatus"></uni-data-select>
|
|
|
</uni-forms-item>
|
|
|
<uni-forms-item label="积分区间" required :rules="[{ 'required': true, errorMessage: '起始值必填' }]"
|
|
|
@@ -452,9 +452,9 @@ const taskFormRules = ref({
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
- * 通用启用状态 checkbox数据
|
|
|
+ * 通用启用状态 下拉选择数据
|
|
|
*/
|
|
|
-const commonEnabledStatusCheckBoxData = ref([{
|
|
|
+const commonEnabledStatusSelectedData = ref([{
|
|
|
"text": "启用",
|
|
|
"value": 'ENABLED'
|
|
|
}, {
|
|
|
@@ -463,9 +463,9 @@ const commonEnabledStatusCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 打卡方式 checkbox数据
|
|
|
+ * 打卡方式 下拉选择数据
|
|
|
*/
|
|
|
-const punchInMethodCheckBoxData = ref([{
|
|
|
+const punchInMethodSelectedData = ref([{
|
|
|
"text": "单次打卡",
|
|
|
"value": 'SINGLE'
|
|
|
}, {
|
|
|
@@ -477,9 +477,9 @@ const punchInMethodCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 比较规则 checkbox数据
|
|
|
+ * 比较规则 下拉选择数据
|
|
|
*/
|
|
|
-const compareRuleCheckBoxData = ref([{
|
|
|
+const compareRuleSelectedData = ref([{
|
|
|
"text": "大于等于",
|
|
|
"value": 'GTE'
|
|
|
}, {
|
|
|
@@ -488,9 +488,9 @@ const compareRuleCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 全勤周期 checkbox数据
|
|
|
+ * 全勤周期 下拉选择数据
|
|
|
*/
|
|
|
-const fullAttendancePeriodCheckBoxData = ref([{
|
|
|
+const fullAttendancePeriodSelectedData = ref([{
|
|
|
"text": "周",
|
|
|
"value": 'WEEK'
|
|
|
}, {
|
|
|
@@ -499,9 +499,9 @@ const fullAttendancePeriodCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 重复周期类型 checkbox数据
|
|
|
+ * 重复周期类型 下拉选择数据
|
|
|
*/
|
|
|
-const repeatCategoryCheckBoxData = ref([{
|
|
|
+const repeatCategorySelectedData = ref([{
|
|
|
"text": "每日",
|
|
|
"value": 'EVERYDAY'
|
|
|
}, {
|
|
|
@@ -516,9 +516,9 @@ const repeatCategoryCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 自定义重复日 checkbox数据
|
|
|
+ * 自定义重复日 下拉选择数据
|
|
|
*/
|
|
|
-const repeatCustomDayCheckBoxData = ref([{
|
|
|
+const repeatCustomDaySelectedData = ref([{
|
|
|
"text": "周一",
|
|
|
"value": '1'
|
|
|
}, {
|
|
|
@@ -542,9 +542,9 @@ const repeatCustomDayCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
- * 额外奖励方式 checkbox数据
|
|
|
+ * 额外奖励方式 下拉选择数据
|
|
|
*/
|
|
|
-const extraMethodCheckBoxData = ref([{
|
|
|
+const extraMethodSelectedData = ref([{
|
|
|
"text": "无",
|
|
|
"value": 'NONE'
|
|
|
}, {
|
|
|
@@ -556,20 +556,6 @@ const extraMethodCheckBoxData = ref([{
|
|
|
}]);
|
|
|
|
|
|
// 方法
|
|
|
-/**
|
|
|
- * 周末双倍奖励开关改变监听
|
|
|
- */
|
|
|
-const weekendDoubleSwitchChange = (e) => {
|
|
|
- taskFormData.value.weekendDoubleFlag = e.detail.value;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * 全勤奖励开关改变监听
|
|
|
- */
|
|
|
-const fullAttendanceSwitchChange = (e) => {
|
|
|
- taskFormData.value.fullAttendanceFlag = e.detail.value;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 时间选择监听
|
|
|
*/
|