From aaacbbd10235ec0fc3b6b8b7373b3ed83c00357f Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 08 十二月 2019 09:52:30 +0800
Subject: [PATCH] 首页加入演示视频
---
WebService/src/main/resources/components/staffPackage/addStaffStep/addStaffStep.js | 147 ++++++++++++++++++++++++------------------------
1 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/WebService/src/main/resources/components/staffPackage/addStaffStep/addStaffStep.js b/WebService/src/main/resources/components/staffPackage/addStaffStep/addStaffStep.js
index 3fb9636..3f59c91 100644
--- a/WebService/src/main/resources/components/staffPackage/addStaffStep/addStaffStep.js
+++ b/WebService/src/main/resources/components/staffPackage/addStaffStep/addStaffStep.js
@@ -1,56 +1,55 @@
/**
- 鍏ラ┗灏忓尯
-**/
-(function(vc){
+ 鍏ラ┗灏忓尯
+ **/
+(function (vc) {
vc.extends({
- data:{
- addStaffStepInfo:{
- $step:{},
- index:0,
- infos:[],
- branchOrgInfo:{
- orgId:'',
- componentName:'鍒嗗叕鍙镐俊鎭�',
- buttonName:'閫夋嫨鍒嗗叕鍙�',
- orgName:'',
- orgLevel:'2',
- parentOrgId:'',
- description:'',
+ data: {
+ addStaffStepInfo: {
+ $step: {},
+ index: 0,
+ infos: [],
+ branchOrgInfo: {
+ orgId: '',
+ componentName: '鍒嗗叕鍙镐俊鎭�',
+ buttonName: '閫夋嫨鍒嗗叕鍙�',
+ orgName: '',
+ orgLevel: '2',
+ parentOrgId: '',
+ description: '',
},
- departmemtOrgInfo:{
- orgId:'',
- componentName:'閮ㄩ棬淇℃伅',
- buttonName:'閫夋嫨閮ㄩ棬',
- orgName:'',
- orgLevel:'3',
- parentOrgId:'',
- description:'',
+ departmemtOrgInfo: {
+ orgId: '',
+ componentName: '閮ㄩ棬淇℃伅',
+ buttonName: '閫夋嫨閮ㄩ棬',
+ orgName: '',
+ orgLevel: '3',
+ parentOrgId: '',
+ description: '',
},
- staffInfo:{
- orgId:'',
- username:'',
- sex:'',
- email:'',
- tel:'',
- address:'',
- relCd:'',
+ staffInfo: {
+ orgId: '',
+ username: '',
+ sex: '',
+ email: '',
+ tel: '',
+ address: '',
+ relCd: '',
}
}
},
- _initMethod:function(){
+ _initMethod: function () {
vc.component._initStep();
},
- _initEvent:function(){
- vc.on("addStaffStep", "notify", function(_info){
- if(vc.component.addStaffStepInfo.index == 0){
- vc.copyObject(_info,vc.component.addStaffStepInfo.branchOrgInfo);
+ _initEvent: function () {
+ vc.on("addStaffStep", "notify", function (_info) {
+ if (vc.component.addStaffStepInfo.index == 0) {
+ vc.copyObject(_info, vc.component.addStaffStepInfo.branchOrgInfo);
vc.component.addStaffStepInfo.infos[0] = vc.component.addStaffStepInfo.branchOrgInfo;
- }else if(vc.component.addStaffStepInfo.index == 1){
- vc.copyObject(_info,vc.component.addStaffStepInfo.departmemtOrgInfo);
+ } else if (vc.component.addStaffStepInfo.index == 1) {
+ vc.copyObject(_info, vc.component.addStaffStepInfo.departmemtOrgInfo);
vc.component.addStaffStepInfo.staffInfo.orgId = _info.orgId
vc.component.addStaffStepInfo.infos[1] = vc.component.addStaffStepInfo.departmemtOrgInfo;
-
- }else{
+ } else {
vc.copyObject(_info, vc.component.addStaffStepInfo.staffInfo);
vc.component.addStaffStepInfo.infos[2] = vc.component.addStaffStepInfo.staffInfo;
}
@@ -58,18 +57,18 @@
});
},
- methods:{
- _initStep:function(){
+ methods: {
+ _initStep: function () {
vc.component.addStaffStepInfo.$step = $("#step");
vc.component.addStaffStepInfo.$step.step({
index: 0,
time: 500,
- title: ["閫夋嫨鍒嗗叕鍙�","閫夋嫨閮ㄩ棬","鍛樺伐淇℃伅"]
+ title: ["閫夋嫨鍒嗗叕鍙�", "閫夋嫨閮ㄩ棬", "鍛樺伐淇℃伅"]
});
vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();
vc.component._notifyViewOrgInfoComponentData();
},
- _prevStep:function(){
+ _prevStep: function () {
vc.component.addStaffStepInfo.$step.prevStep();
vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();
@@ -79,59 +78,59 @@
vc.component._notifyViewOrgInfoComponentData();
},
- _nextStep:function(){
+ _nextStep: function () {
var _currentData = vc.component.addStaffStepInfo.infos[vc.component.addStaffStepInfo.index];
- if( _currentData == null || _currentData == undefined){
+ if (_currentData == null || _currentData == undefined) {
vc.message("璇烽�夋嫨鎴栧~鍐欏繀閫変俊鎭�");
- return ;
+ return;
}
vc.component.addStaffStepInfo.$step.nextStep();
vc.component.addStaffStepInfo.index = vc.component.addStaffStepInfo.$step.getIndex();
- vc.emit('viewOrgInfo', 'onIndex', vc.component.addStaffStepInfo.index);
+ vc.emit('viewOrgInfo', 'onIndex', vc.component.addStaffStepInfo.index);
vc.emit('addStaffView', 'onIndex', vc.component.addStaffStepInfo.index);
vc.component._notifyViewOrgInfoComponentData();
},
- _finishStep:function(){
+ _finishStep: function () {
//vc.component.addStaffStepInfo.staffInfo.departmentOrgId = vc.component.addStaffStepInfo.infos[1].orgId;
var _currentData = vc.component.addStaffStepInfo.infos[vc.component.addStaffStepInfo.index];
- if( _currentData == null || _currentData == undefined){
+ if (_currentData == null || _currentData == undefined) {
vc.message("璇烽�夋嫨鎴栧~鍐欏繀閫変俊鎭�");
- return ;
+ return;
}
- vc.http.post(
- 'addStaffStepBinding',
- 'binding',
- JSON.stringify(vc.component.addStaffStepInfo.staffInfo),
- {
- emulateJSON:true
+ vc.http.post(
+ 'addStaffStepBinding',
+ 'binding',
+ JSON.stringify(vc.component.addStaffStepInfo.staffInfo),
+ {
+ emulateJSON: true
},
- function(json,res){
- if(res.status == 200){
+ function (json, res) {
+ if (res.status == 200) {
- vc.message('澶勭悊鎴愬姛',true);
- //鍏抽棴model
- vc.jumpToPage("/flow/staff");
- return ;
- }
- vc.message(json);
+ vc.message('澶勭悊鎴愬姛', true);
+ //鍏抽棴model
+ vc.jumpToPage("/flow/staff");
+ return;
+ }
+ vc.message(json);
},
- function(errInfo,error){
- console.log('璇锋眰澶辫触澶勭悊');
+ function (errInfo, error) {
+ console.log('璇锋眰澶辫触澶勭悊');
- vc.message(errInfo);
+ vc.message(errInfo);
});
},
- _notifyViewOrgInfoComponentData:function(){
+ _notifyViewOrgInfoComponentData: function () {
- if(vc.component.addStaffStepInfo.index == 0){
- vc.emit('viewOrgInfo', '_initInfo',vc.component.addStaffStepInfo.branchOrgInfo);
- }else if(vc.component.addStaffStepInfo.index == 1){
+ if (vc.component.addStaffStepInfo.index == 0) {
+ vc.emit('viewOrgInfo', '_initInfo', vc.component.addStaffStepInfo.branchOrgInfo);
+ } else if (vc.component.addStaffStepInfo.index == 1) {
vc.component.addStaffStepInfo.departmemtOrgInfo.parentOrgId = vc.component.addStaffStepInfo.branchOrgInfo.orgId;
- vc.emit('viewOrgInfo', '_initInfo',vc.component.addStaffStepInfo.departmemtOrgInfo);
+ vc.emit('viewOrgInfo', '_initInfo', vc.component.addStaffStepInfo.departmemtOrgInfo);
}
}
}
--
Gitblit v1.8.0