This commit is contained in:
Anfioo
2025-12-09 22:27:35 +08:00
parent 7dc18067ac
commit 950d8db10b
372 changed files with 931 additions and 900 deletions

View File

@@ -1,5 +1,5 @@
(function(vc) {
var default_row = 100;
(function (vc) {
var default_row = 9999;
vc.extends({
data: {
selectStaffsInfo: {
@@ -16,17 +16,19 @@
selectStaffs: [],
}
},
_initMethod: function() {},
_initEvent: function() {
vc.on('selectStaffs', 'setStaffs', function(_staffs) {
_initMethod: function () {
},
_initEvent: function () {
vc.on('selectStaffs', 'setStaffs', function (_staffs) {
$that.selectStaffsInfo.selectStaffs = _staffs;
});
vc.on('selectStaffs', 'switchOrg', function(_param) {
vc.on('selectStaffs', 'switchOrg', function (_param) {
$that.loadStaff(_param);
})
},
methods: {
loadStaff: function(_org) {
loadStaff: function (_org) {
let param = {
params: {
page: 1,
@@ -38,7 +40,7 @@
//发送get请求
vc.http.apiGet('/query.staff.infos',
param,
function(json) {
function (json) {
var _staffInfo = JSON.parse(json);
$that.selectStaffsInfo.staffs = _staffInfo.staffs;
if (_staffInfo.staffs.length < 1) {
@@ -46,12 +48,12 @@
}
$that.selectStaffsInfo.curStaffId = _staffInfo.staffs[0].orgId
},
function() {
function () {
console.log('请求失败处理');
}
);
},
_changeStaff: function(_staff) {
_changeStaff: function (_staff) {
let hasIn = false;
$that.selectStaffsInfo.selectStaffs.forEach(item => {
if (item.userId == _staff.userId) {
@@ -65,7 +67,7 @@
}
$that.selectStaffsInfo.selectStaffs.push(_staff);
},
_removeStaff: function(_staff) {
_removeStaff: function (_staff) {
let _staffs = $that.selectStaffsInfo.selectStaffs;
for (let _staffIndex = 0; _staffIndex < _staffs.length; _staffIndex++) {
if (_staffs[_staffIndex].userId == _staff.userId) {