|
@@ -88,46 +88,78 @@
|
|
<div v-isKeyboard>
|
|
<div v-isKeyboard>
|
|
<div class="flex-box-ce footer">
|
|
<div class="flex-box-ce footer">
|
|
<van-button size="large" plain type="info" style="margin-right: 0.2rem;width: 2rem;" @click="openSelect">已选{{items.length}}条</van-button>
|
|
<van-button size="large" plain type="info" style="margin-right: 0.2rem;width: 2rem;" @click="openSelect">已选{{items.length}}条</van-button>
|
|
- <van-button size="large" @click="data_verify" type="info">提交</van-button>
|
|
|
|
|
|
+<!-- <van-button size="large" @click="data_verify" type="info" :disabled="!rwsHasAuth" >提交</van-button>-->
|
|
|
|
+ <van-button size="large" @click="rwsBusinessVerify" type="info" :disabled="!rwsHasAuth" >提交</van-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 提交结果 -->
|
|
<!-- 提交结果 -->
|
|
- <van-popup v-model="isResult" style="width: 90%;border-radius: 5px;">
|
|
|
|
- <div v-if="!isShowError" style="padding: 0.24rem;">
|
|
|
|
- <van-progress :percentage="percentage" />
|
|
|
|
- <div style="margin-top: 10px;border: 1px solid #f1f1f1;max-height: 7rem;overflow-y: auto;" class="scroll-bar">
|
|
|
|
- <div class="flex-box-ce results" style="font-weight: 600;">
|
|
|
|
- <div style="border-right: 1px solid #f1f1f1;width: 40px;">序号</div>
|
|
|
|
- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>
|
|
|
|
- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div>
|
|
|
|
- <div class="flex-1" >处理结果</div>
|
|
|
|
- </div>
|
|
|
|
- <div class="flex-box-ce results" v-for="(item, index) in results" :key="index">
|
|
|
|
- <div style="border-right: 1px solid #f1f1f1;width: 40px;">{{results.length-index}}</div>
|
|
|
|
- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.target }}</div>
|
|
|
|
- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.point>0? '+'+item.point:item.point }}<span> {{ $getTypesName(ptId) }}</span></div>
|
|
|
|
- <div class="flex-1" v-if="item.status == 1">
|
|
|
|
- <span v-if="item.msg=='奖扣成功'" class="green">{{ item.msg }}</span>
|
|
|
|
- <span class="blue" v-else>{{ item.msg }}</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="flex-1 red" v-else>{{ item.msg }}</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="flex-box-end" style="margin-top: 20px;" v-show="results.length==resultList.length">
|
|
|
|
- <van-button type="info" @click="isResult = false" size="small">确 定</van-button>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div v-else>
|
|
|
|
- <div style="text-align: center;" class="red">{{errorMsg}}</div>
|
|
|
|
- <div>
|
|
|
|
- <div class="flex-box-end" style="margin-top: 10px;">
|
|
|
|
- <van-button type="info" @click="isResult = false" size="small">确 定</van-button>
|
|
|
|
|
|
+<!-- <van-popup v-model="isResult" style="width: 90%;border-radius: 5px;">-->
|
|
|
|
+<!-- <div v-if="!isShowError" style="padding: 0.24rem;">-->
|
|
|
|
+<!-- <van-progress :percentage="percentage" />-->
|
|
|
|
+<!-- <div style="margin-top: 10px;border: 1px solid #f1f1f1;max-height: 7rem;overflow-y: auto;" class="scroll-bar">-->
|
|
|
|
+<!-- <div class="flex-box-ce results" style="font-weight: 600;">-->
|
|
|
|
+<!-- <div style="border-right: 1px solid #f1f1f1;width: 40px;">序号</div>-->
|
|
|
|
+<!-- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>-->
|
|
|
|
+<!-- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div>-->
|
|
|
|
+<!-- <div class="flex-1" >处理结果</div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div class="flex-box-ce results" v-for="(item, index) in results" :key="index">-->
|
|
|
|
+<!-- <div style="border-right: 1px solid #f1f1f1;width: 40px;">{{results.length-index}}</div>-->
|
|
|
|
+<!-- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.target }}</div>-->
|
|
|
|
+<!-- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.point>0? '+'+item.point:item.point }}<span> {{ $getTypesName(ptId) }}</span></div>-->
|
|
|
|
+<!-- <div class="flex-1" v-if="item.status == 1">-->
|
|
|
|
+<!-- <span v-if="item.msg=='奖扣成功'" class="green">{{ item.msg }}</span>-->
|
|
|
|
+<!-- <span class="blue" v-else>{{ item.msg }}</span>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div class="flex-1 red" v-else>{{ item.msg }}</div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div class="flex-box-end" style="margin-top: 20px;" v-show="results.length==resultList.length">-->
|
|
|
|
+<!-- <van-button type="info" @click="isResult = false" size="small">确 定</van-button>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div v-else>-->
|
|
|
|
+<!-- <div style="text-align: center;" class="red">{{errorMsg}}</div>-->
|
|
|
|
+<!-- <div>-->
|
|
|
|
+<!-- <div class="flex-box-end" style="margin-top: 10px;">-->
|
|
|
|
+<!-- <van-button type="info" @click="isResult = false" size="small">确 定</van-button>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </van-popup>-->
|
|
|
|
+ <RuleScopeSelector :visible.sync = showRuleSelector :selected="itemRule" multi @confirm="selected => itemRule = selected" :pt-id="ptId" />
|
|
|
|
+
|
|
|
|
+<!-- rws提交结果 -->
|
|
|
|
+ <van-popup v-model="rwsBusinessData.showBusiness" :close-on-click-overlay="false" style="width: 90%; border-radius: 5px;">
|
|
|
|
+ <div style="padding: 0.24rem;">
|
|
|
|
+ <van-progress :percentage="rwsBusinessProgress" />
|
|
|
|
+ <div style="margin-top: 10px;border: 1px solid #f1f1f1;max-height: 7rem;overflow-y: auto;" class="scroll-bar">
|
|
|
|
+ <div class="flex-box-ce results" style="font-weight: 600;">
|
|
|
|
+ <div style="border-right: 1px solid #f1f1f1;width: 40px;">序号</div>
|
|
|
|
+ <div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>
|
|
|
|
+ <div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div>
|
|
|
|
+ <div class="flex-1" >处理结果</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="flex-box-ce results" v-for="(item,index) in rwsBusinessData.dataList" :key="index">
|
|
|
|
+ <div style="border-right: 1px solid #f1f1f1;width: 40px;">{{`${index + 1}`}}</div>
|
|
|
|
+ <div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.employee_name }}</div>
|
|
|
|
+ <div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.point>0? '+'+item.point:item.point }}<span> {{ $getTypesName(ptId) }}</span></div>
|
|
|
|
+ <div class="flex-1">
|
|
|
|
+ <span :class="{'cyan':item.status === -2,'origin':item.status === -1,'green':item.status === 1,'red':item.status === 0}" >{{item.msg}}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+<!-- <div class="flex-box-end" style="margin-top: 20px;" v-show="rwsBusinessProgress >= 100">-->
|
|
|
|
+<!-- <van-button type="info" @click="rwsBusinessData.showBusiness = false" size="small">确 定</van-button>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+ <div class="flex-box-end" style="margin-top: 20px;">
|
|
|
|
+ <van-button type="info" :disabled="rwsBusinessProgress < 100" @click="rwsBusinessData.showBusiness = false" size="small" >确 定</van-button>
|
|
|
|
+ <van-tag style="margin-left: 0.2rem;" @click="rwsClipResult">{{rwsBusinessData.result.length}} / {{rwsBusinessData.dataList.length}}</van-tag>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</van-popup>
|
|
</van-popup>
|
|
- <RuleScopeSelector :visible.sync = showRuleSelector :selected="itemRule" multi @confirm="selected => itemRule = selected" :pt-id="ptId" />
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -142,6 +174,8 @@ import Vue from 'vue'
|
|
import ImageCamera from '@/attendance/components/image-camera';
|
|
import ImageCamera from '@/attendance/components/image-camera';
|
|
import {Switch,Progress} from 'vant'
|
|
import {Switch,Progress} from 'vant'
|
|
import RuleScopeSelector from "../../../components/RuleScopeSelector.vue";
|
|
import RuleScopeSelector from "../../../components/RuleScopeSelector.vue";
|
|
|
|
+import ReconnectingWebSocket from "reconnecting-websocket";
|
|
|
|
+import {generateUUID, getToken} from "../../../utils/auth";
|
|
|
|
|
|
Vue.use(Switch).use(Progress)
|
|
Vue.use(Switch).use(Progress)
|
|
export default {
|
|
export default {
|
|
@@ -210,7 +244,16 @@ export default {
|
|
resultIndex:0,
|
|
resultIndex:0,
|
|
isShowError:false,
|
|
isShowError:false,
|
|
errorMsg:'服务器繁忙,请稍后再试',
|
|
errorMsg:'服务器繁忙,请稍后再试',
|
|
-
|
|
|
|
|
|
+ rws:null,
|
|
|
|
+ rwsHasAuth:false,
|
|
|
|
+ rwsBusinessData:{
|
|
|
|
+ showBusiness:false,
|
|
|
|
+ dataList:[],
|
|
|
|
+ msgQueue:[],
|
|
|
|
+ result:[],
|
|
|
|
+ employees:[],
|
|
|
|
+ items:[],
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -272,14 +315,17 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
employee_list(val) {
|
|
employee_list(val) {
|
|
- if (val.length > 0) {
|
|
|
|
- this.dialogData.members = []
|
|
|
|
- this.dialogData.members=val.map(element => {
|
|
|
|
- return element.id
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.dialogData.members = []
|
|
|
|
- }
|
|
|
|
|
|
+ // if (val.length > 0) {
|
|
|
|
+ // this.dialogData.members = []
|
|
|
|
+ // this.dialogData.members=val.map(element => {
|
|
|
|
+ // return element.id
|
|
|
|
+ // })
|
|
|
|
+ // } else {
|
|
|
|
+ // this.dialogData.members = []
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
|
|
+ // console.log(val);
|
|
|
|
+ this.rwsBusinessData.employees = val && val.length > 0 ? val : [];
|
|
},
|
|
},
|
|
isResult(val){
|
|
isResult(val){
|
|
if(!val){
|
|
if(!val){
|
|
@@ -297,6 +343,25 @@ export default {
|
|
this.$socketApi.closewebsocket();
|
|
this.$socketApi.closewebsocket();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ 'rwsBusinessData.showBusiness'(v){
|
|
|
|
+ if (!v){
|
|
|
|
+ this.initRwsBusinessData();
|
|
|
|
+ this.dialogData = {
|
|
|
|
+ members: [],
|
|
|
|
+ items: []
|
|
|
|
+ };
|
|
|
|
+ this.itemRule = [];
|
|
|
|
+ this.ruleCate = [];
|
|
|
|
+ this.rule_switch = true;
|
|
|
|
+ this.items = [];
|
|
|
|
+ this.employee_list = [];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed:{
|
|
|
|
+ rwsBusinessProgress(){
|
|
|
|
+ return this.rwsBusinessData.dataList.length === 0 ? 0 : Math.floor(this.rwsBusinessData.dataList.filter(item => item.status >= 0).length / this.rwsBusinessData.dataList.length * 100);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
openText(){
|
|
openText(){
|
|
@@ -317,6 +382,7 @@ export default {
|
|
this.$notify({type: 'danger', message: str})
|
|
this.$notify({type: 'danger', message: str})
|
|
},
|
|
},
|
|
data_verify () {
|
|
data_verify () {
|
|
|
|
+ // console.log(this.dialogData,this.items);return ;
|
|
let dialogData=this.dialogData
|
|
let dialogData=this.dialogData
|
|
dialogData.items=this.items.map(e=>{
|
|
dialogData.items=this.items.map(e=>{
|
|
if(e.reviewer_list.length>0){
|
|
if(e.reviewer_list.length>0){
|
|
@@ -401,7 +467,9 @@ export default {
|
|
files: element.files
|
|
files: element.files
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- this.webSocket(data);
|
|
|
|
|
|
+ // console.log(data,this.dialogData);this.isResult = true; return ;
|
|
|
|
+ this.rwsBusinessSubmit(data.members,data.items);
|
|
|
|
+ // this.webSocket(data);
|
|
},
|
|
},
|
|
webSocket(data){
|
|
webSocket(data){
|
|
let {members,items}=data;
|
|
let {members,items}=data;
|
|
@@ -485,6 +553,200 @@ export default {
|
|
|
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
},
|
|
},
|
|
|
|
+ initRws(){
|
|
|
|
+ if (this.rws){
|
|
|
|
+ this.rws.close();
|
|
|
|
+ this.rws = null;
|
|
|
|
+ this.rwsHasAuth = false;
|
|
|
|
+ }
|
|
|
|
+ this.rws = new ReconnectingWebSocket(process.env.VUE_APP_WEBSCOKET);
|
|
|
|
+ this.rws.onopen = this.onWsOpen;
|
|
|
|
+ this.rws.onmessage = this.onWsMessage;
|
|
|
|
+ this.rws.onerror = this.onWsError;
|
|
|
|
+ this.rws.onclose = this.onWsClose;
|
|
|
|
+ },
|
|
|
|
+ initRwsBusinessData(){
|
|
|
|
+ this.rwsBusinessData.dataList = [];
|
|
|
|
+ this.rwsBusinessData.msgQueue = [];
|
|
|
|
+ this.rwsBusinessData.result = [];
|
|
|
|
+ this.rwsBusinessData.items = [];
|
|
|
|
+ },
|
|
|
|
+ onWsOpen(){
|
|
|
|
+ let params = {
|
|
|
|
+ type:'auth',
|
|
|
|
+ token: getToken(),
|
|
|
|
+ machine: generateUUID(),
|
|
|
|
+ }
|
|
|
|
+ this.rws.send(JSON.stringify(params));
|
|
|
|
+ },
|
|
|
|
+ onWsMessage(event){
|
|
|
|
+ let msg = event.data ? JSON.parse(event.data) : null;
|
|
|
|
+ if (!msg) return;
|
|
|
|
+ let type = msg.type || 'none';
|
|
|
|
+ switch (type){
|
|
|
|
+ case 'ping':
|
|
|
|
+ this.rws.send('point entry keep connecting');
|
|
|
|
+ break;
|
|
|
|
+ case 'auth':
|
|
|
|
+ this.rwsHasAuth = msg.code === 1;
|
|
|
|
+ break;
|
|
|
|
+ case 'pea':
|
|
|
|
+ case 'peb':
|
|
|
|
+ this.rwsBusinessData.result.push(msg);
|
|
|
|
+ let businessId = msg.result.task.msg.businessId;
|
|
|
|
+ this.rwsBusinessData.dataList.forEach(item => {
|
|
|
|
+ if (item.businessId !== businessId) return;
|
|
|
|
+ item.status = msg.result.status;
|
|
|
|
+ item.msg = msg.result.msg;
|
|
|
|
+ })
|
|
|
|
+ this.rwsPointEntry();
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onWsError(event){
|
|
|
|
+ console.log('on ws error',event);
|
|
|
|
+ this.rwsHasAuth = false;
|
|
|
|
+ },
|
|
|
|
+ onWsClose(event){
|
|
|
|
+ console.log('on ws close',event)
|
|
|
|
+ this.rwsHasAuth = false;
|
|
|
|
+ },
|
|
|
|
+ clearRws(){
|
|
|
|
+ if (this.rws) this.rws.close();
|
|
|
|
+ this.rws = null;
|
|
|
|
+ this.rwsHasAuth = false;
|
|
|
|
+ this.initRwsBusinessData();
|
|
|
|
+ },
|
|
|
|
+ rwsPointEntry(){
|
|
|
|
+ let msg = this.rwsBusinessData.msgQueue.shift();
|
|
|
|
+ if (!msg) return;
|
|
|
|
+ this.rwsBusinessData.dataList.forEach(item => {
|
|
|
|
+ if (item.businessId !== msg.businessId) return;
|
|
|
|
+ item.status = -1;
|
|
|
|
+ item.msg = '处理中';
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.rws.send(JSON.stringify(msg));
|
|
|
|
+ },
|
|
|
|
+ rwsBusinessSubmit(members,items){
|
|
|
|
+ if (!members || members.length <= 0 || !items || items.length <= 0) {
|
|
|
|
+ this.showMessage('规则/分类以及录入对象必须选择');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let employeeMap = {}
|
|
|
|
+ this.rwsBusinessData.employees.forEach(employee => {
|
|
|
|
+ employeeMap[employee.id] = employee;
|
|
|
|
+ });
|
|
|
|
+ let businessId = 1;
|
|
|
|
+ this.initRwsBusinessData(); //清空提交业务数据
|
|
|
|
+ members.forEach(memberId => {
|
|
|
|
+ items.forEach(item => {
|
|
|
|
+ item.type = this.ptId === 2 ? 'pea' : 'peb';
|
|
|
|
+ item.employee_id = memberId;
|
|
|
|
+ item.employee_name = employeeMap[memberId] ? employeeMap[memberId].name : '';
|
|
|
|
+ item.status = -2;
|
|
|
|
+ item.msg = '待处理';
|
|
|
|
+ item.businessId = businessId;
|
|
|
|
+ this.rwsBusinessData.dataList.push(JSON.parse(JSON.stringify(item)))
|
|
|
|
+ businessId++;
|
|
|
|
+
|
|
|
|
+ /*队列数据*/
|
|
|
|
+ let msg = {
|
|
|
|
+ type:item.type,
|
|
|
|
+ employee_id:item.employee_id,
|
|
|
|
+ event_time:item.event_time,
|
|
|
|
+ files:item.files,
|
|
|
|
+ item_id:item.item_id,
|
|
|
|
+ point:item.point,
|
|
|
|
+ pt_id:item.pt_id,
|
|
|
|
+ remark:item.remark,
|
|
|
|
+ reviewer_id:item.reviewer_id,
|
|
|
|
+ rule_id:item.rule_id,
|
|
|
|
+ businessId:item.businessId,
|
|
|
|
+ }
|
|
|
|
+ this.rwsBusinessData.msgQueue.push(JSON.parse(JSON.stringify(msg)))
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ this.rwsBusinessData.showBusiness = true;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /*开始提交*/
|
|
|
|
+ this.rwsPointEntry();
|
|
|
|
+ },
|
|
|
|
+ rwsBusinessVerify(){
|
|
|
|
+ if (this.items.length === 0) {
|
|
|
|
+ this.showMessage("请选择规则或者分类");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.rwsBusinessData.employees.length === 0) {
|
|
|
|
+ this.showMessage("请选择录入对象");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.rwsBusinessData.items = this.items.map(item => {
|
|
|
|
+ item.reviewer_id = item.reviewer_list.length > 0 ? item.reviewer_list[0].id : '';
|
|
|
|
+ return item;
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let userMaxPoint = null;
|
|
|
|
+ let userMinPoint = null;
|
|
|
|
+
|
|
|
|
+ this.$userInfo().point_config.point_limit.forEach(point => {
|
|
|
|
+ if (this.ptId !== point.pt_id) return;
|
|
|
|
+ userMaxPoint = Math.abs(point.point);
|
|
|
|
+ userMinPoint = userMaxPoint * -1;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let members = this.rwsBusinessData.employees.map(employee => employee.id);
|
|
|
|
+ let items = [];
|
|
|
|
+
|
|
|
|
+ // for ([item,index] of this.rwsBusinessData.items){
|
|
|
|
+ for (var i = 0; i < this.rwsBusinessData.items.length; i++){
|
|
|
|
+ let item = this.rwsBusinessData.items[i];
|
|
|
|
+ items.push({
|
|
|
|
+ rule_id: item.rule_id || 0,
|
|
|
|
+ item_id: item.item_id || 0,
|
|
|
|
+ point: item.point,
|
|
|
|
+ remark: item.remark,
|
|
|
|
+ event_time: item.event_time,
|
|
|
|
+ pt_id: this.ptId,
|
|
|
|
+ reviewer_id: item.reviewer_id || 0,
|
|
|
|
+ files: item.files
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if (item.point === 0){
|
|
|
|
+ this.showMessage(`第${i + 1}条奖扣输入积分分值不能为0`);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (!item.remark){
|
|
|
|
+ this.showMessage(`第${i + 1}条奖扣请输入事件内容及描述`);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /*非创始人并且奖扣A分/指定分类/企业配置规则内要验证权限分时,验证权限分*/
|
|
|
|
+ if (!this.isCreator && (this.ptId === 2 || !this.rule_switch || this.$userInfo().site_config.rule_limit_check > 0) && userMaxPoint !== null && userMinPoint !== null){
|
|
|
|
+ if (item.reviewer_id > 0) continue;
|
|
|
|
+
|
|
|
|
+ if (item.point > 0 && item.point > userMaxPoint){
|
|
|
|
+ this.showMessage(`第${i + 1}条奖扣输入积分分值超出权限分,请选择审批人递交`);
|
|
|
|
+ return false;
|
|
|
|
+ }else if (item.point <= 0 && item.point < userMinPoint){
|
|
|
|
+ this.showMessage(`第${i + 1}`);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.rwsBusinessSubmit(members,items);
|
|
|
|
+ },
|
|
|
|
+ rwsClipResult(){
|
|
|
|
+ navigator.clipboard.writeText(JSON.stringify(this.rwsBusinessData.result));
|
|
|
|
+ this.$notify({type: 'info', message: '结果已经复制到剪切板'})
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
this.itemRule=[];
|
|
this.itemRule=[];
|
|
@@ -503,6 +765,10 @@ export default {
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
this.rule_switch=true;
|
|
this.rule_switch=true;
|
|
})
|
|
})
|
|
|
|
+ this.initRws();
|
|
|
|
+ },
|
|
|
|
+ beforeDestroy() {
|
|
|
|
+ this.clearRws();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|