From 9dee5e1c040c5f17f3e49b86f7fc615af0068d95 Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期三, 26 十一月 2025 16:55:31 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/system/user/Xt_UserGroupList.vue | 760 ++++++++++++++++++++++++++++++++++++++
src/views/system/user/Xt_UserGroupEdit.vue | 371 ++++++++++++++++++
src/store/modules/permission.js | 12
src/router/index.js | 19
4 files changed, 1,162 insertions(+), 0 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index a5a7334..24b8c27 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -185,6 +185,25 @@
},
],
},
+ //鐢ㄦ埛鍒楄〃
+ {
+ path: "/system/user/Xt_UserGroupList",
+ component: Layout,
+ hidden: true,
+ redirect: "noredirect",
+ meta: {
+ breadcrumb: false, // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず
+ activeMenu: "/system/user", // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋��
+ },
+ children: [
+ {
+ path: "/system/user/Xt_UserGroupList",
+ component: () => import("@/views/system/user/Xt_UserGroupList.vue"),
+ name: "Xt_UserGroupList",
+ meta: { title: "瑙掕壊鍒楄〃", activeMenu: "system/user" },
+ },
+ ],
+ },
//閲囪喘鍏ュ簱鍗�
{
path: "/purchase/POStockInBill/POStockInBillList",
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 7f2e5b1..22d0eaa 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -1208,6 +1208,18 @@
icon: "build",
link: null,
noCache: false,
+ title: "瑙掕壊鍒楄〃",
+ },
+ component: () =>import("@/views/system/user/Xt_UserGroupList.vue"),
+ hidden: false,
+ name: "Xt_UserGroupList",
+ path: "Xt_UserGroupList",
+ },
+ {
+ meta: {
+ icon: "build",
+ link: null,
+ noCache: false,
title: "鏉冮檺鏌ヨ",
},
component: () =>
diff --git a/src/views/system/user/Xt_UserGroupEdit.vue b/src/views/system/user/Xt_UserGroupEdit.vue
new file mode 100644
index 0000000..a970543
--- /dev/null
+++ b/src/views/system/user/Xt_UserGroupEdit.vue
@@ -0,0 +1,371 @@
+<template>
+ <div v-loading="formLoading" v-if="formShow">
+ <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
+ <el-button type="primary" @click="submitForm">淇� 瀛�</el-button>
+ <el-button type="primary" @click="close">閫� 鍑�</el-button>
+ <!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
+ </div>
+ <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">鏂板/缂栬緫鐢ㄦ埛淇℃伅</div>
+ <el-form ref="form" :model="form" :rules="rules" label-width="128px">
+ <el-tabs v-model="activeName" type="card">
+ <el-tab-pane label="鍩烘湰淇℃伅" name="first">
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="瑙掕壊" prop="HGroupName">
+ <el-input v-model="form.HGroupName" placeholder="璇疯緭鍏ヨ鑹�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="绾у埆" prop="HLev">
+ <el-select v-model="form.HLev" placeholder="璇烽�夋嫨绾у埆">
+ <el-option label="鎬荤粡鐞嗙骇" value="鎬荤粡鐞嗙骇"></el-option>
+ <el-option label="鍓�荤骇" value="鍓�荤骇"></el-option>
+ <el-option label="璐ㄩ噺鎬荤洃" value="璐ㄩ噺鎬荤洃"></el-option>
+ <el-option label="閮ㄩ暱绾�" value="閮ㄩ暱绾�"></el-option>
+ <el-option label="涓荤绾�" value="涓荤绾�"></el-option>
+ <el-option label="宸ョ▼甯�" value="宸ョ▼甯�"></el-option>
+ <el-option label="鐝粍闀跨骇" value="鐝粍闀跨骇"></el-option>
+ <el-option label="缁勫憳绾�" value="缁勫憳绾�"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="缁勭粐" prop="HUSEORGID">
+ <el-select v-model="form.HUSEORGID" placeholder="璇烽�夋嫨缁勭粐">
+ <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-form-item label="璇存槑" prop="Explain">
+ <el-input type="textarea" v-model="form.Explain" placeholder="璇疯緭鍏ヨ鏄�" />
+ </el-form-item>
+ </el-row>
+ </el-tab-pane>
+ </el-tabs>
+ <el-table :data="editData" ref="editData" style="width: 100%" height="300" width="100%"
+ @selection-change="handleTableZbEdit" border>
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column align="center" label="hmainid" prop="鍗曟嵁ID" />
+ <el-table-column align="center" label="鐢ㄦ埛缂栫爜" prop="鐢ㄦ埛缂栫爜" />
+ <el-table-column align="center" label="鐢ㄦ埛鍚嶇О" prop="鐢ㄦ埛鍚嶇О" />
+ <el-table-column align="center" label="瀵瑰簲鑱屽憳" prop="瀵瑰簲鑱屽憳" />
+ <el-table-column align="center" label="瀵瑰簲淇濈" prop="瀵瑰簲淇濈" />
+ <el-table-column align="center" label="瀵瑰簲楠屾敹" prop="瀵瑰簲楠屾敹" />
+ <el-table-column align="center" label="瀵瑰簲涓氬姟鍛�" prop="瀵瑰簲涓氬姟鍛�" />
+ <el-table-column align="center" label="瀵瑰簲閮ㄩ棬" prop="瀵瑰簲閮ㄩ棬" />
+ <el-table-column align="center" label="瀵瑰簲浠撳簱" prop="瀵瑰簲浠撳簱" />
+ <el-table-column align="center" label="瀵瑰簲璋冨叆浠撳簱" prop="瀵瑰簲璋冨叆浠撳簱" />
+ <el-table-column align="center" label="瀵瑰簲渚涘簲鍟�" prop="瀵瑰簲渚涘簲鍟�" />
+ <el-table-column align="center" label="瀵瑰簲CLOUD璐﹀彿" prop="瀵瑰簲CLOUD璐﹀彿" />
+ <el-table-column align="center" label="瀵瑰簲CLOUD缁勭粐" prop="瀵瑰簲CLOUD缁勭粐" />
+ </el-table>
+ </el-form>
+ </div>
+</template>
+
+<script>
+import axios from 'axios'
+
+export default {
+ name: 'Xt_UserGroupEdit',
+ components: {},
+ props: {
+ OperationType: { type: Number, },
+ linterid: {},
+ },
+ data() {
+ return {
+ baseURL: process.env.VUE_APP_BASE_API, //鍚庣鎺ュ彛鍓嶇紑
+
+ HModName: "Xt_UserListEdit",
+ formShow: false, //琛ㄥ崟鏁版嵁鍔犺浇鏍囪
+ formLoading: true, //琛ㄥ崟鍔犺浇鍔ㄧ敾鏄剧ず鏍囪
+ subDisabled: false, //淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
+
+ rowHideShow: false, //鍒楄缃〉闈㈠唴瀹瑰姞杞芥爣璁�
+ openRowHide: false, //鍒楄缃脊绐楁樉绀烘爣璁�
+ temp: undefined, //涓存椂瀛楁
+
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
+
+ editData: [], //瀛愯〃鏁版嵁
+ checkedSysZb: [], //瀛愯〃閫変腑鏁版嵁
+ activeName: 'first',
+ };
+ },
+ created() {
+ this.getdata()
+ },
+ methods: {
+ //#region 椤甸潰鍒濆鍖�
+ getdata() {
+ this.formShow = false
+ this.formLoading = true
+ this.getUserGroup()
+ if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
+ this.handleAdd()
+ } else if (this.OperationType == 3 || this.copyType == 1) {
+ this.$nextTick(() => {
+ this.handleUpdate()
+ })
+ }
+ },
+
+ //#region 椤甸潰鏁版嵁鍒濆鍖�
+ reset() {
+ this.form = {
+ Czybm: '',
+ Czymc: '',
+ Czmm: '',
+ Czyyz: '',
+ Explain: '',
+ HEmpID: 0,
+ HEmpName: '',
+ HK3UserName: '',
+ HK3UserID: 0,
+ HKeeper: '',
+ HKeeperID: 0,
+ HSecManager: '',
+ HSecManagerID: 0,
+ HSellManID: 0,
+ HSellMan: '',
+ HDept: '',
+ HDeptID: 0,
+ HWHName: '',
+ HWhID: 0,
+ HSCWHName: '',
+ HSCWHID: 0,
+ HSupName: '',
+ HSupID: 0,
+ HCloudUserName: '',
+ HCloudUserPsd: '',
+ HOrgID: sessionStorage["OrganizationID"] - 0,
+ HProcID: 0,
+ HProcName: '',
+ HCusID: 0,
+ HCusName: '',
+ HGroupID: 0,
+ HGroupName: '',
+ HSourceID: 0,
+ HSourceName: '',
+ HCheckEmpID: 0,
+ HCheckEmpName: '',
+ HWorkCenterID: 0,
+ HWorkCenterName: '',
+ HICNumber: '',
+ HDingDingUserID: 0,
+ }
+ this.editData = []
+ this.editBtData = []
+ this.ids = []
+ this.subDisabled = false
+ this.activeName = 'first'
+ this.resetForm("form");
+ },
+ //#endregion
+
+ //#region 鏂板椤甸潰鍒濆鍖�
+ handleAdd() {
+ this.reset()
+ this.formShow = true
+ this.formLoading = false
+ },
+ //#endregion
+
+ //#region 缂栬緫椤甸潰鍒濆鍖�
+ handleUpdate() {
+ this.reset()
+ let rowHmainid = this.linterid
+ axios.get(this.baseURL + "/Xt_User/EditUser", {
+ params: { 'HID': rowHmainid }
+ }).then(response => {
+ if (response.data.code == 1) {
+ var result = response.data
+ var data = result.data.h_v_IF_UserList_Edit[0]
+ this.form.Czybm = data.鐢ㄦ埛缂栫爜
+ this.form.Czymc = data.鐢ㄦ埛鍚嶇О
+ this.form.Czmm = data.瀵嗙爜
+ this.form.Czyyz = data.瀵嗙爜
+ this.form.Explain = data.璇存槑
+ this.form.HEmpID = data.HEmpID
+ this.form.HEmpName = data.瀵瑰簲鑱屽憳
+ this.form.HK3UserName = data.HK3UserID
+ this.form.HK3UserID = data.HK3UserID
+ this.form.HKeeper = data.HKeeper
+ this.form.HKeeperID = data.HKeeperID
+ this.form.HSecManager = data.HSecManager
+ this.form.HSecManagerID = data.HSecManagerID
+ this.form.HSellManID = data.HSellManID
+ this.form.HSellMan = data.HSellMan
+ this.form.HDept = data.HDept
+ this.form.HDeptID = data.HDeptID
+ this.form.HWHName = data.HWHName
+ this.form.HWhID = data.HWhID
+ this.form.HSCWHName = data.HSCWHName
+ this.form.HSCWHID = data.HSCWHID
+ this.form.HSupName = data.HSupName
+ this.form.HSupID = data.HSupID
+ this.form.HCloudUserName = data.瀵瑰簲CLOUD璐﹀彿
+ this.form.HCloudUserPsd = data.HCloudUserPsd
+ this.form.HOrgID = data.HUSEORGID
+ this.form.HProcID = data.HProcID
+ this.form.HProcName = data.宸ュ簭
+ this.form.HCusID = data.HCusID
+ this.form.HCusName = data.瀹㈡埛
+ this.form.HGroupID = data.HGroupID
+ this.form.HGroupName = data.鐝粍
+ this.form.HSourceID = data.HSourceID
+ this.form.HSourceName = data.鐢熶骇璧勬簮
+ this.form.HCheckEmpID = data.HCheckEmpID
+ this.form.HCheckEmpName = data.妫�楠屽憳
+ this.form.HWorkCenterID = data.HWorkCenterID
+ this.form.HWorkCenterName = data.宸ヤ綔涓績
+ this.form.HICNumber = data.IC鍗″彿
+ this.form.HDingDingUserID = data.閽夐拤ID鍙�
+ this.formShow = true
+ this.get_DisplayUserGroupInfoList()
+ this.formLoading = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //#endregion
+
+ //#endregion
+
+ //#region 鑾峰彇瀛愯〃鏁版嵁
+ getUserGroup() {
+ //瑙掕壊鍒楄〃
+ axios.get(this.baseURL + '/Xt_UserGroup/list', {
+ params: {
+ sWhere: '',
+ },
+ }).then(response => {
+ let data1 = response.data
+ if (data1.code == 1) {
+ this.editData = data1.data
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //#endregion
+
+
+ get_DisplayUserGroupInfoList() {
+ var sWhere = "and UserId='" + this.linterid + "'";
+ axios.get(this.baseURL + '/Xt_UserGroup/UserGroupInfoList', {
+ params: {
+ sWhere: sWhere,
+ },
+ }).then(response => {
+ let data1 = response.data
+ if (data1.count == 1) {
+ if (data1.data.length > 0)
+ if (this.editData.length > 0) {
+ this.editData.forEach(row => {
+ if (data1.data.some(selectedRow => selectedRow.GroupId === row.HGroupID)) {
+ this.$refs.editData.toggleRowSelection(row)
+ }
+ })
+ }
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+
+ //#region 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
+ getUrlVars_JSON() {
+ var datajson;
+ var str = this.propsData; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
+ var arr = str.substring(str.lastIndexOf("=") + 1);
+ datajson = JSON.parse(decodeURI(arr));
+ return datajson;
+ },
+ //#endregion
+
+
+ //#region 缁勭粐涓嬫媺鍒楄〃鍊煎彉鏇寸洃鍚�
+ organizationChange(val) {
+ // let options=undefined
+ // this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
+ },
+ //#endregion
+
+ //#region 瀛愯〃澶嶉�夋閫変腑鏁版嵁鐩戝惉浜嬩欢
+ handleTableZbEdit(selection) {
+ this.checkedSysZb = selection
+ // this.editData.forEach(row => {
+ // row.AuthorityHID = this.checkedSysZb.some(selectedRow => selectedRow.GroupId === row.HGroupID) ? 1 : 0;
+ // });
+ },
+ //#endregion
+
+ //#region 淇濆瓨
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ var num = [];
+ var Sav = ''
+ if (this.OperationType == 1) {
+ Sav = 'Add'
+ } else if (this.OperationType == 3) {
+ Sav = "Update"
+ }
+ for (var i = 0; i < this.checkedSysZb.length; i++) {
+ num.push(this.checkedSysZb[i].HGroupID)
+ }
+ var sSubStr = num.toString() == "" ? "-1" : num.toString();
+ var sMainStr = JSON.stringify(this.form) + ';' + Sav + ';' + sSubStr;
+ axios({
+ method: 'post',
+ url: this.baseURL + "/Xt_User/SaveUser",
+ data: {
+ 'msg': sMainStr
+ },
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.formShow = false
+ this.$emit('editClose', false)
+ this.$modal.msgSuccess(response.data.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }
+ });
+ },
+ //#endregion
+
+ //#region 閫�鍑�
+ close() {
+ this.reset()
+ this.formShow = false
+ this.$emit('editClose', false)
+ },
+ //#endregion
+
+ //#region 鍒楄缃�
+ handleRowHide() {
+ this.rowHideShow = true
+ this.openRowHide = true
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false
+ this.openRowHide = val
+ },
+ //#endregion
+
+ }
+};
+</script>
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
+}
+</style>
diff --git a/src/views/system/user/Xt_UserGroupList.vue b/src/views/system/user/Xt_UserGroupList.vue
new file mode 100644
index 0000000..a0a7808
--- /dev/null
+++ b/src/views/system/user/Xt_UserGroupList.vue
@@ -0,0 +1,760 @@
+<template>
+ <div style="padding: 10px;">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px" class="searchBox">
+ <el-form-item label="瑙掕壊" prop="HGroupName" style="margin-left:100px;">
+ <el-input v-model="queryParams.HGroupName" placeholder="璇疯緭鍏ヨ鑹插悕绉�" @keyup.enter.native="handleQuery" />
+ </el-form-item>
+ <el-form-item label="缁勭粐" prop="HUSEORGID">
+ <el-select v-model="queryParams.HUSEORGID" placeholder="璇烽�夋嫨缁勭粐">
+ <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label-width="78px">
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery"> 鎼� 绱�</el-button>
+ <el-button icon="el-icon-circle-close" @click="resetQuery">閲� 缃�</el-button>
+ </el-form-item>
+ <el-collapse v-model="activeSeach">
+ <el-collapse-item title="鏇村" name="1">
+ <el-card class="box-card">
+ <div slot="header" class="clearfix"><span>杩囨护</span></div>
+ <div>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
+ :value="item.field"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator1" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label-width="0">
+ <el-row>
+ <el-col :span="7">
+ <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <span v-for="(item, index) in btList" :key="index">
+ <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
+ </span>
+ </el-select>
+ </el-col>
+ <el-col :span="6" style="padding: 0 10px;">
+ <el-select v-model="queryParams.Comparator2" placeholder="璇烽�夋嫨" @change="riqiChange">
+ <el-option v-for="(item, index) in comparatorList" :key="index" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="11">
+ <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
+ @keyup.enter.native="handleQuery" />
+ </el-col>
+ </el-row>
+ </el-form-item>
+ </el-row>
+ </div>
+ </el-card>
+ </el-collapse-item>
+ </el-collapse>
+ </el-form>
+ <el-row :gutter="10" class="mb8" style="margin-top: 10px;">
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit(OperationType = 1)"
+ id="btn-Add">鏂板</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
+ @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-date" size="mini" @click="handleRowHide">闅愯棌鍒楄缃�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-share" size="mini" :disabled="single" @click="queryClick">鏉冮檺</el-button>
+ </el-col>
+ </el-row>
+ <div class="tableBox" v-loading="loading">
+ <el-table :data="tableData" ref="tableData" max-height="710" :summary-method="getSummaries"
+ @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick" :row-style="rowStyle"
+ @cell-dblclick="handleDblclick" v-if="tableShow">
+ <template v-for="(item, index) in btList">
+ <el-table-column type="selection" width="55" align="center" :fixed="item.fixed" v-if="item.type == 'checkbox'"
+ :key="index" />
+ <el-table-column :align="item.align" :prop="item.field" :label="item.title" :width="item.width" :key="item.id"
+ v-else-if="!item.hide && item.type != 'checkbox'" :sortable="item.sort" show-overflow-tooltip
+ :fixed="item.fixed">
+ <template slot-scope="{row, column }">
+ <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
+ <div :style="item.style">
+ <span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
+ <span v-else>{{ row[column.label] }}</span>
+ </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ <!-- 璁板綍鏁般�侀〉鏁般�佸綋鍓嶉〉 -->
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" @pagination="handleQuery" />
+ <!-- 鍒楄缃� -->
+ <el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
+ <RowSettings :colName="btResList" HModName="Xt_UserGroupList" @rowEditClose="rowSetClose"
+ v-if="rowHideShow" />
+ </el-dialog>
+ <!-- 缂栬緫 -->
+ <el-dialog title="缂栬緫" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <edit :OperationType=OperationType :linterid="this.rowForm.hmainid" @editClose="editClose" v-if="editShow" />
+ </el-dialog>
+ <!-- 鏉冮檺 -->
+ <el-dialog title="瑙掕壊鏉冮檺" :visible.sync="openQuery" width="1480px" append-to-body class="xsckdBox">
+ <Query HSouceBillType="js" @editQueryClose="editQueryClose" :linterid=this.rowForm.HGroupID v-if="queryShow" />
+ </el-dialog>
+ </div>
+ </div>
+</template>
+
+<script>
+import axios from 'axios'
+import moment from 'moment'; //瀵煎嚭缁勪欢
+import RowSettings from '@/views/component/rowSettings' //鍒楄缃粍浠�
+import Edit from '@/views/system/user/Xt_UserGroupEdit' //缂栬緫椤甸潰缁勪欢
+import Query from '@/views/system/user/powerInformation.vue'
+
+export default {
+ name: 'Xt_UserGroupList',
+ components: { RowSettings, Edit,Query,moment },
+ data() {
+ return {
+ baseURL: process.env.VUE_APP_BASE_API, //鍚庣鎺ュ彛鍓嶇紑(鍚庣鏈嶅姟鍣╥p鍦板潃)
+
+ OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ copyType: 0, //澶嶅埗鏍囪銆傛墦寮�缂栬緫缁勪欢鏃讹紝鐢ㄤ簬鍖哄垎缂栬緫杩樻槸澶嶅埗
+ HInterID: null,
+
+ rqsgList: [ //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鏁版嵁
+ { label: '浠婂ぉ', value: 0 },
+ { label: '杩戜袱澶�', value: 1 },
+ { label: '杩戜笁澶�', value: 2 },
+ { label: '杩戝洓澶�', value: 3 },
+ { label: '杩戜簲澶�', value: 4 },
+ { label: '杩戝叚澶�', value: 5 },
+ { label: '杩戜竷澶�', value: 6 },
+ { label: '杩�30澶�', value: 29 },
+ { label: '杩戝崐骞�', value: 180 },
+ { label: '杩戜竴骞�', value: 365 },
+ ],
+
+ organizationList: [], //缁勭粐鍒楄〃
+ btList: [], //鍒楄〃琛ㄥご瀛楁鍒楄〃
+ comparatorList: [ //杩愮畻鏍囪瘑涓嬫媺鍒楄〃
+ { label: '=', value: '=' },
+ { label: '>=', value: '>=' },
+ { label: '>', value: '>' },
+ { label: '<=', value: '<=' },
+ { label: '<', value: '<' },
+ { label: '<>', value: '<>' },
+ { label: '鍖呭惈', value: '7' },
+ { label: '宸﹀寘鍚�', value: '8' },
+ { label: '鍙冲寘鍚�', value: '9' },
+ { label: '涓嶅寘鍚�', value: '10' },
+ ],
+
+ dialogTitle: '', // 寮圭獥鏍囬
+ title: "", // 寮瑰嚭灞傛爣棰�
+ open: false, // 鏄惁鏄剧ず寮瑰嚭灞�
+ loading: true, // 閬僵灞�
+
+ activeSeach: '',
+ editShow: false, //缂栬緫缁勪欢瀹瑰櫒鏄剧ず鏍囪
+ openEdit: false, //缂栬緫缁勪欢鏄剧ず鏍囪
+ openRowHide: false, //鍒楄缃粍浠舵樉绀烘爣璁�
+ rowHideShow: false, //鍒楄缃粍浠跺鍣ㄦ樉绀烘爣璁�
+ openQuery:false, //鏉冮檺椤甸潰寮圭獥鏄剧ず鏍囪
+ queryShow:false, //鏉冮檺椤甸潰鏁版嵁鍔犺浇鏍囪
+
+ // 鏌ヨ鍙傛暟
+ sWhere: '', // 鎷兼帴杩囨护鏉′欢
+ queryParams: { // form鏁版嵁
+ HGroupName: "", //瑙掕壊鍚嶇О
+ HUSEORGID: sessionStorage["OrganizationID"] - 0, //缁勭粐
+ ColName: '',
+ Comparator: '',
+ ColContent: '',
+ ColName1: '',
+ Comparator1: '',
+ ColContent1: '',
+ ColName2: '',
+ Comparator2: '',
+ ColContent2: '',
+ },
+
+ page: 1, // page椤电储寮�
+ pageSize: 0, // page椤甸潰璁板綍鏁�
+ total: 0, // 璁板綍鍚堣鏁�
+ tableShow: true, // table鏄剧ず鏍囪
+ totalNameList: [], // 闇�瑕佽缃悎璁¤鐨勫垪鏁扮粍
+ tableData: [], // 鍒楄〃鏁版嵁銆傜敤浜巘able鐩戝惉浜嬩欢
+ ids: [], // 閫変腑琛岀殑hmainid鏁扮粍
+ single: true, // 褰撻�変腑鐨勮鏁颁笉涓�1鏃朵负true銆傜敤浜庣鐢ㄧ浉鍏虫搷浣�
+ multiple: true, // 褰撻�変腑鐨勮鏁颁负0鏃朵负true銆傜敤浜庣鐢ㄧ浉鍏虫搷浣�
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {}, // 褰撻�変腑鐨勫彧鏈変竴琛屾椂锛屾洿鏂版暟鎹负璇ラ�変腑鐨勮銆�
+
+ tyResList: [], // 鍒楄〃鏁版嵁锛岀敤浜庡鍑�
+ titleData: [], // 涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ btResList: [], // 鍒楄〃琛ㄥご鏁版嵁銆傜敤浜庡垪璁剧疆
+ dataList: [], // option璁板綍銆傜敤浜庡綋option鏁版嵁鏃犳晥鏃讹紝鐢ㄤ簬鍒楄缃�
+ };
+ },
+ created() {
+ this.fetchData() //鍔犺浇缁勭粐涓嬫媺鍒楄〃鏁版嵁
+ this.handleQuery();
+ },
+
+ methods: {
+ //#region 璁剧疆琛ㄥご
+ renderHeader(h, { column, $index }) {// 鏂板缓涓�涓� span
+ let span = document.createElement(span)// 璁剧疆琛ㄥご鍚嶇О
+ span.innerText = column.label
+ //涓存椂鎻掑叆 document
+ document.body.appendChild(span)// 閲嶇偣:鑾峰彇 span 鏈�灏忓搴︼紝璁剧疆褰撳墠鍒楋紝娉ㄦ剰杩欓噷鍔犱簡 20锛屽瓧娈佃緝澶氭椂column.minWidth=span.getBoundingClientRect().width + 50.//绉婚櫎 document 涓复鏃剁殑 span
+ document.body.removeChild(span)
+ return h(span, column.label)
+ },
+ //#endregion
+
+ //#region 鐐瑰嚮琛�
+ handleRowClick(row, column, event) {
+ this.lastSelectedRow = this.selectedRow; // 璁板綍涓婁竴娆¢�変腑鐨勮
+ this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
+ this.lastSelectedRowIndex = this.tableData.indexOf(row);
+ this.$refs.tableData.toggleRowSelection(row);
+ },
+ //#endregion
+
+ //#region 閫変腑琛岄珮浜牱寮�
+ rowStyle({ row, rowIndex }) {
+ if (this.ids.includes(row.hmainid)) {
+ return { "background": "#ecf5ff" }
+ }
+ },
+ //#endregion
+
+ //#region 鍙屽嚮琛�
+ handleDblclick(row, column, cell, event) {
+ this.OperationType = 3
+ this.handleEdit()
+ },
+ //#endregion
+
+ //#region 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ // this.rowForm = {}
+ this.ids = selection.map(item => item.hmainid)
+ this.single = selection.length != 1
+ this.multiple = !selection.length
+ if (!this.single) {
+ this.rowForm = selection[0]
+ }
+ },
+ //#endregion
+
+ //#region 鍔犺浇缁勭粐涓嬫媺鍒楄〃鏁版嵁
+ fetchData() {
+ axios.get(this.baseURL + "/Web/GetOrganizations", {
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.organizationList = response.data.data;//缁勭粐鍒楄〃
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ this.queryParams.HUSEORGID = sessionStorage["OrganizationID"]-0;
+ },
+ //#endregion
+
+ //#region 鏍规嵁鏃ユ湡闂撮殧锛岃缃紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+ riqiChange() {
+ },
+ //#endregion
+
+ //#region 閲嶇疆
+ resetQuery() {
+ this.sWhere = ''
+ this.queryParams = {
+ HGroupName: "", //瑙掕壊鍚嶇О
+ HUSEORGID: sessionStorage["OrganizationID"] - 0, //缁勭粐
+ ColName: '',
+ Comparator: '',
+ ColContent: '',
+ ColName1: '',
+ Comparator1: '',
+ ColContent1: '',
+ ColName2: '',
+ Comparator2: '',
+ ColContent2: '',
+ }
+ this.resetForm("queryForm")
+ this.handleQuery()
+ },
+ //#endregion
+
+ //#region 蹇�熻繃婊�
+ handleQuery() {
+ this.sWhere = ''
+ if (this.queryParams.ColName && this.queryParams.Comparator) {
+ var com = "";
+ switch (this.queryParams.Comparator) {
+ case "7":
+ com = "like'%" + this.queryParams.ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + this.queryParams.ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + this.queryParams.ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + this.queryParams.ColContent + "%'";
+ break;
+ default:
+ com = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName + " " + com;
+ }
+ if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
+ var com1 = "";
+ switch (this.queryParams.Comparator1) {
+ case "7":
+ com1 = "like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + this.queryParams.ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + this.queryParams.ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + this.queryParams.Comparator1 + "'" + this.queryParams.ColContent1 + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
+ }
+ if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
+ var com2 = "";
+ switch (this.queryParams.Comparator2) {
+ case "7":
+ com2 = "like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + this.queryParams.ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + this.queryParams.ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
+ break;
+ }
+ this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
+ }
+ if (this.queryParams.HGroupName) {
+ this.sWhere += " and 瑙掕壊 like '%" + this.queryParams.HGroupName + "%'";
+ }
+ // if (this.queryParams.HUSEORGID) {
+ // this.sWhere += " and HUSEORGID = '" + this.queryParams.HUSEORGID + "'";
+ // }
+ this.getList()
+ },
+ //#endregion
+
+ //#region 鏌ヨ
+ getList() {
+ this.pageSize = 50
+ if (this.pageSize == 0) {
+ this.pageSize = 50
+ }
+ this.tableShow = false
+ this.loading = true
+
+ // 鍒楄〃鏌ヨ
+ axios.get(this.baseURL + '/Xt_UserGroup/list', {
+ params: {
+ "sWhere": this.sWhere,
+ },
+ }).then(response => {
+ this.tyResList = response.data.data//鎬绘暟鎹�
+ let data1 = response.data
+ let option = []
+ if (data1.code == 1) {
+ this.btResList = data1.list //鍒楄〃琛ㄥご鏁版嵁
+ this.total = data1.count;
+ var data = [];//鍒楀瓧娈垫暟鎹�
+ var col = [];
+ var totalArray = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+ for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+ if (this.titleData.indexOf(data[i].name) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑 //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //璁$畻鍒�
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+
+ col = [
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HGroupID', title: 'HGroupID', sort: true, hide: true }
+ , { field: '瑙掕壊', title: '瑙掕壊' }
+ , { field: '绾у埆', title: '绾у埆' }
+ , { field: '璇存槑', title: '璇存槑' }
+ , { field: '浣跨敤缁勭粐', title: '浣跨敤缁勭粐' }
+ ]
+
+ option.cols = [col]
+ this.dataList = option
+ option.data = data1.data;
+ var result = data1.data;
+ option.data = result;
+ let HModName = "Xt_UserGroupList"
+ this.DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, this.dataList);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+
+ //#region 鍚堣琛屾暟鎹鐞�
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = '鍚堣';
+ return;
+ }
+ const values = data.map(item => Number(item[column.property]));
+ if (this.totalNameList[index].totalRow) {
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr);
+ if (!isNaN(value)) {
+ return prev + curr;
+ } else {
+ return prev;
+ }
+ }, 0)
+
+ } else {
+ sums[index] = '';
+ }
+ }
+ }, 1000);
+ return sums;
+ },
+ //#endregion
+
+ //#endregion
+
+ //#region 鏂板
+ handleAddEdit() {
+ this.rowForm.hmainid = 0
+ this.editShow = true
+ this.openEdit = true
+ },
+ //#endregion
+
+ //#region 缂栬緫
+ handleEdit(row) {
+ this.rowForm = row
+ this.editShow = true
+ this.openEdit = true
+ },
+ editClose(val) {
+ this.open = val
+ this.editShow = false
+ this.openEdit = val
+ this.handleQuery()
+ },
+ //#endregion
+
+ //#region 鍒犻櫎
+ handleDelete() {
+ this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
+ axios.get(this.baseURL + "/Xt_UserGroup/DelXt_UserGroupList", {
+ params: { 'HInterID': this.rowForm.HGroupID.toString(), 'user': sessionStorage["HUserName"] }
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.handleQuery()
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }).catch(() => { })
+ },
+ //#endregion
+
+ //#region 鍒楄缃�
+ handleRowHide() {
+ this.rowHideShow = true
+ this.openRowHide = true
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false
+ this.tableShow = true
+ this.openRowHide = val
+ this.handleQuery()
+ },
+ DisPlay_HideColumn(HModName, user, option, dataOption) {
+ this.totalNameList = []
+ axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ params: {
+ "HModName": HModName,
+ "user": user,
+ },
+ }).then(res => {
+ let data1 = res.data
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && this.titleData.indexOf(option.cols[0][i + 1]["title"]) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ } else {
+ option.cols[0][i + 1]["totalRow"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ break;
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i + 1]["fixed"] != null) {
+ option.cols[0][i + 1]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if (dataOption.cols[0].indexOf(option.cols[0][i + 1]["title"]) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ //璁剧疆鍒楁帓搴�
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (data1.data[0].HSortFlag == "鏄�") {
+ option.cols[0][i]["sort"] = true;
+ }
+ else {
+ option.cols[0][i]["sort"] = false;
+ }
+ }
+ }
+ }
+ this.btList = option.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ if (data1.data[0].HPageSize == 0) {
+ this.pageSize = 50
+ } else {
+ this.pageSize = data1.data[0].HPageSize
+ }
+ this.tableData = option.data
+ this.tableShow = true
+ this.loading = false
+ } else {
+ this.btList = dataOption.cols[0]
+ this.btList.map(item => {
+ if (!item.hide) {
+ this.totalNameList.push(item)
+ }
+ })
+ this.tableData = dataOption.data
+ this.tableShow = true
+ this.loading = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //#endregion
+
+ //#region 鏉冮檺璁剧疆
+ queryClick() {
+ this.queryShow = true
+ this.openQuery = true
+ },
+
+ editQueryClose(val) {
+ this.queryShow = false
+ this.openQuery = false
+ this.single= true
+ this.ids = []
+ this.getList()
+ },
+ //#endregion
+
+ //#region 瀵煎嚭
+ handleExport() {
+ const ws = this.$XLSX.utils.json_to_sheet(this.tyResList); // 灏嗘暟鎹浆鎹负宸ヤ綔琛�
+ const wb = this.$XLSX.utils.book_new(); // 鍒涘缓涓�涓柊鐨勫伐浣滅翱
+ this.$XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); // 灏嗗伐浣滆〃娣诲姞鍒板伐浣滅翱涓紝骞跺懡鍚嶄负"Sheet1"
+ this.$XLSX.writeFile(wb, `Xt_UserGroupList_${new Date().getTime()}.xlsx`); // 瀵煎嚭鏂囦欢
+ },
+ //#endregion
+
+ //#region 閫�鍑�
+ close() {
+ // this.reset()
+ this.tableShow = true
+ this.openEdit = false
+ this.editShow = false
+ this.handleQuery()
+ },
+ //#endregion
+
+ //#region 鑾峰彇鍏徃鍚嶏紝鏍规嵁鍏徃杩涜瀹氬埗鍖栧紑鍙�
+ defaintOperationByCompanyName() {
+ var result = false;
+ axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => {
+ var data1 = response.data
+ if (data1.count == 1) {
+ if (data1.data == "姘村姟") {
+ result = true;
+ }
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return result;
+ },
+ //#endregion
+ }
+};
+</script>
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
+}
+</style>
--
Gitblit v1.9.1