From b46bc2dba51a3885a68e4c58316b41a31ea16bb2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 14 二月 2023 13:35:03 +0800
Subject: [PATCH] 1.存货档案修改

---
 src/views/jcsz/yhqd.vue | 1704 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 1,702 insertions(+), 2 deletions(-)

diff --git a/src/views/jcsz/yhqd.vue b/src/views/jcsz/yhqd.vue
index 654cc72..141ce53 100644
--- a/src/views/jcsz/yhqd.vue
+++ b/src/views/jcsz/yhqd.vue
@@ -1,13 +1,1713 @@
 <template>
+  <div>
+    <div class="body" :style="{height:mainHeight+'px'}">
+      <div class="bodyTopButtonGroup" style="justify-content: space-between">
 
+        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+
+        <div style="display: flex">
+          <el-button v-waves icon="el-icon-menu" @click="workingTramClick">鐢熶骇鐝粍</el-button>
+          <el-button v-waves icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+        </div>
+      </div>
+
+      <div class="bodyTopFormGroup">
+        <el-form
+          ref="form"
+          :model="form"
+          label-width="100px"
+          inline
+          style="display: flex;"
+        >
+          <div class="elForm">
+            <el-form-item label="鐢ㄦ埛缂栫爜" style=" display: flex;">
+              <el-input v-model="form.UserCode" placeholder="璇疯緭鍏�" style="width: 200px" />
+            </el-form-item>
+            <el-form-item label="鐢ㄦ埛鍚嶇О" style=" display: flex;">
+              <el-input v-model="form.UserName" placeholder="璇疯緭鍏�" style="width: 200px" />
+            </el-form-item>
+            <el-form-item label="鎵�灞炵粍缁�" style=" display: flex;">
+              <el-cascader
+                ref="cascader"
+                filterable
+                popper-class="elCascader"
+                :options="StuOrgArr"
+                :props="defaultProps"
+                @change="cascaderChange"
+              />
+              <!--              @focus="getUserOrganization"-->
+
+            </el-form-item>
+            <el-form-item label="宸ヨ祫绫诲瀷" style=" display: flex;">
+              <el-select
+                v-model="form.wagetype"
+                :popper-append-to-body="false"
+                filterable
+                style="width: 200px"
+                placeholder="璇烽�夋嫨"
+              >
+                <el-option
+                  v-for="item in wagetypeArr"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item v-show="isExpandForm" label="鍦ㄨ亴鐘舵��" style=" display: flex;">
+              <el-select
+                v-model="form.Enable"
+                :popper-append-to-body="false"
+                filterable
+                style="width: 200px"
+                placeholder="璇烽�夋嫨"
+              >
+                <el-option
+                  v-for="item in EnableArr"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+          </div>
+          <div
+            class="bodySearchReset"
+            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
+          >
+            <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
+          </div>
+        </el-form>
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverType==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverType=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverType==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+            @click="isExpandForm=!isExpandForm"
+            @mouseout="mouseHoverType=$event.type"
+          />
+        </div>
+      </div>
+
+      <div class="elTableDiv">
+        <!--        <TableColumnSettings-->
+        <!--          :list1="tableColumnSettingsArray"-->
+        <!--          @tableColumnUpdate="tableColumnUpdate"-->
+        <!--        />-->
+        <el-table
+          ref="tableDataRef"
+          :key="tableTimeStampKey"
+          :data="tableData"
+          class="tableFixed"
+          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
+          highlight-current-row
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
+          :header-cell-style="this.$headerCellStyle"
+          :row-class-name="tableRowClassName"
+          :cell-style="this.$cellStyle"
+          border
+          @sort-change="sortChange"
+        >
+
+          <el-table-column
+            v-for="item in tableColumnSettingsArray"
+            v-if="item.show"
+            :key="item.id"
+            :sortable="item.sortable"
+            :prop="item.prop"
+            :min-width="item.minWidth"
+            :label="item.label"
+            :width="item.width"
+            show-tooltip-when-overflow
+            :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row[item.prop]==='1'&&row.wagetype">璁℃椂鍒�</div>
+              <div v-else-if="row[item.prop]==='2'&&row.wagetype">璁′欢鍒�</div>
+              <div v-else-if="row[item.prop]==='Y'&& item.prop==='enable'"><i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />鍦ㄨ亴</div>
+              <div v-else-if="row[item.prop]==='N'&& item.prop==='enable'"><i class="el-icon-info" style="margin-right: 2px" />绂昏亴</div>
+              <div v-else-if="row[item.prop]==='Y'&& item.prop==='is_role'"><i class="el-icon-share" :style="{color:$store.state.settings.theme}" @click="roleClick({row})" /></div>
+              <div v-else-if="row[item.prop]==='N'&& item.prop==='is_role'"><i class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="roleClick({row})" /></div>
+              <div v-else-if="!row[item.prop]">/</div>
+              <div v-else>{{ row[item.prop] }}</div>
+            </template>
+          </el-table-column>
+
+          <!--          <el-table-column-->
+          <!--            type="selection"-->
+          <!--            width="50"-->
+          <!--          />-->
+
+          <!--          <el-table-column-->
+          <!--            prop="RowNum"-->
+          <!--            width="50"-->
+          <!--            label="搴忓彿"-->
+          <!--            fixed-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="usercode"-->
+          <!--            label="鐢ㄦ埛缂栫爜"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            min-width="110"-->
+          <!--            sortable="custom"-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="username"-->
+          <!--            label="鐢ㄦ埛鍚嶇О"-->
+          <!--            min-width="110"-->
+          <!--            sortable="custom"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="password"-->
+          <!--            label="鐢ㄦ埛瀵嗙爜"-->
+          <!--            min-width="110"-->
+          <!--            sortable="custom"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="org_name"-->
+          <!--            label="鎵�灞炵粍缁�"-->
+          <!--            min-width="110"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.org_name">{{ row.org_name }}</div>-->
+          <!--              <div v-else>/</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="group_name"-->
+          <!--            label="鐢熶骇鐝粍"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            min-width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.group_name">{{ row.group_name }}</div>-->
+          <!--              <div v-else>/</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="wagetype"-->
+          <!--            label="宸ヨ祫绫诲瀷"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            sortable="custom"-->
+          <!--            width="110"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.wagetype==='1'">璁℃椂鍒�</div>-->
+          <!--              <div v-if="row.wagetype==='2'">璁′欢鍒�</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="mobile"-->
+          <!--            label="鑱旂郴鏂瑰紡"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            min-width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.mobile===''">/</div>-->
+          <!--              <div v-else>{{ row.mobile }}</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="email"-->
+          <!--            label="鐢靛瓙閭"-->
+          <!--            sortable="custom"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            min-width="110"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.email===''">/</div>-->
+          <!--              <div v-else>{{ row.email }}</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="enable"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            label="鍦ㄨ亴鐘舵��"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.enable==='Y'">-->
+          <!--                &lt;!&ndash;                <svg-icon icon-class="circleYes" style="margin-right: 2px" />&ndash;&gt;-->
+          <!--                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />-->
+          <!--                鍦ㄨ亴-->
+          <!--              </div>-->
+          <!--              <div v-if="row.enable==='N'">-->
+          <!--                &lt;!&ndash;/*                <svg-icon icon-class="circleNo" style="margin-right: 2px" />*/&ndash;&gt;-->
+          <!--                <i class="el-icon-info" style="margin-right: 2px" />-->
+          <!--                绂昏亴-->
+          <!--              </div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="lm_user"-->
+          <!--            label="鍒涘缓浜哄憳"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="lm_date"-->
+          <!--            label="鍒涘缓鏃堕棿"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            width="160"-->
+          <!--            sortable="custom"-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="is_role"-->
+          <!--            label="鍏宠仈瑙掕壊"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--            width="110"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <i-->
+          <!--                v-if="row.is_role==='Y'"-->
+          <!--                :style="{color:$store.state.settings.theme}"-->
+          <!--                class="el-icon-share"-->
+          <!--                @click="roleClick({row})"-->
+          <!--              />-->
+          <!--              <i-->
+          <!--                v-if="row.is_role==='N'"-->
+          <!--                class="el-icon-share"-->
+          <!--                style="color: rgb(180 ,181, 185)"-->
+          <!--                @click="roleClick({row})"-->
+          <!--              />-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <el-table-column
+            label="鎿嶄綔"
+            fixed="right"
+            width="120"
+          >
+            <template slot-scope="{row}">
+              <div class="operationClass">
+                <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
+                  <i
+                    :style="{color:$store.state.settings.theme}"
+                    class="el-icon-edit-outline"
+                    @click="edit('edit',row)"
+                  />
+                </el-tooltip>
+                <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row.id)" />
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!--鍒嗛〉-->
+      <pagination
+        :total="total"
+        :page.sync="form.page"
+        :limit.sync="form.rows"
+        align="right"
+        layout="total ,prev, pager, next,sizes"
+        popper-class="select_bottom"
+        @pagination="getUserSearch"
+      />
+    </div>
+
+    <!--    鐢ㄦ埛娓呭崟鏂板銆佺紪杈�-->
+    <el-dialog
+      v-el-drag-dialog
+      :title="operation==='add'?'鏂板':'缂栬緫'"
+      :visible.sync="dialogVisible"
+      width="800px"
+      :close-on-click-modal="false"
+      top="15vh"
+      @closed="handleClose"
+      @close="handleClose"
+    >
+      <el-form ref="dialogForm" :rules="dialogFormRules" inline :model="dialogForm" label-width="80px">
+        <el-form-item label="鐢ㄦ埛缂栫爜" prop="UserCode">
+          <el-input v-model="dialogForm.UserCode" :disabled="operation!=='add'" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="鐢ㄦ埛鍚嶇О" prop="UserName">
+          <el-input v-model="dialogForm.UserName" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="鐢ㄦ埛瀵嗙爜" prop="Password">
+          <el-input v-model="dialogForm.Password" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="鍦ㄨ亴鐘舵��" prop="Enable">
+          <el-select
+            v-model="dialogForm.Enable"
+            :popper-append-to-body="false"
+            filterable
+            style="width: 200px"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in EnableArr"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="鎵�灞炵粍缁�" prop="StuOrg" style="display: flex;float: left">
+          <el-cascader
+            ref="dialogCascader"
+            key="cascaderKey"
+            filterable
+            popper-class="elCascader"
+            :options="StuOrgArr2"
+            :props="defaultProps"
+            style="width: 200px;"
+            @change="dialogCascaderChange"
+          />
+        </el-form-item>
+        <el-form-item label="鎵�灞炵彮缁�" prop="groupcode">
+          <el-select
+            v-model="dialogForm.groupcode"
+            :popper-append-to-body="false"
+            filterable
+            style="width: 200px"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in usergroupArr"
+              :key="item.group_code"
+              :label="item.group_name"
+              :value="item.group_code"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="宸ヨ祫绫诲瀷" prop="wagetype">
+          <el-select
+            v-model="dialogForm.wagetype"
+            :popper-append-to-body="false"
+            filterable
+            style="width: 200px"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in wagetypeArr"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="鑱旂郴鏂瑰紡" prop="Mobile">
+          <el-input v-model="dialogForm.Mobile" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="鐢靛瓙閭" prop="Email">
+          <el-input v-model="dialogForm.Email" style="width: 200px" />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirm"
+          >纭� 瀹�</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
+    <!--    鍏宠仈瑙掕壊-->
+    <el-dialog
+      v-el-drag-dialog
+      title="鍏宠仈瑙掕壊"
+      :visible.sync="dialogVisibleRoles"
+      width="800px"
+      :top="isIpad?'3vh':'15vh'"
+      :fullscreen="isIpad"
+      :close-on-click-modal="false"
+      class="dialogVisibleRoles"
+      @closed="handleCloseRoles"
+      @close="handleCloseRoles"
+    >
+      <!--      @opened="handleOpenedRoles"-->
+
+      <div>
+        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 鐢ㄦ埛鍚嶇О锛歿{ dialogFormRoles.username }}
+      </div>
+      <el-divider />
+      <div>
+        <div style="margin-bottom:20px">
+          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 瑙掕壊绫诲瀷闆嗗悎锛�
+        </div>
+        <div class="myCheckboxGroup">
+          <div
+            v-for="item in dialogFormRoles.rolesArr"
+            :key="item.code"
+            :style="{border:item.isSelected1?'1px solid '+ $store.state.settings.theme :'1px solid #eee'}"
+            class="myCheckbox"
+            @click="myCheckboxClick(item)"
+          >
+            <!--            <input-->
+            <!--              class="myCheckboxInput"-->
+            <!--              type="checkbox"-->
+            <!--              :value="item.code"-->
+            <!--              :name="item.name"-->
+            <!--              :style="{color:item.isSelected2?'#42b983':'#fff'}"-->
+            <!--              @click="myCheckboxInputClick(item)"-->
+            <!--            >{{ item.name }}-->
+            <!--            鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
+            <!--            onClick="event.cancelBubble = true"-->
+            <el-checkbox
+              :key="item.code"
+              v-model="item.isSelected2"
+              class="myCheckboxInput"
+              :value="item.code"
+              :name="item.name"
+              :label="item.name"
+              :checked="item.isSelected2"
+              @change="myCheckboxInputClick(item)"
+            />
+            <div class="myCheckboxInputLabel">{{ item.name }}</div>
+
+          </div>
+        </div>
+      </div>
+      <el-divider />
+      <div>
+        <div style="margin-bottom:20px">
+          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 瑙掕壊锛�
+        </div>
+        <el-tree
+          ref="roleTree"
+          :data="dialogFormRoles.roleTree"
+          show-checkbox
+          node-key="code"
+          default-expand-all
+          style="height: 300px;overflow-y: scroll"
+          :props="defaultPropsOfRoleTree"
+          @check="checkBoxClick"
+        />
+        <!--        @check-change="checkChange"-->
+
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button v-waves @click="rolesDialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="rolesDialogVisibleConfirm"
+          >纭� 瀹�</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
+    <!--    浜х粍鎸夐挳瀵硅瘽妗�-->
+    <el-dialog
+      v-el-drag-dialog
+      title="鐢熶骇鐝粍"
+      :visible.sync="workingDialogVisible"
+      width="800px"
+      top="15vh"
+      :close-on-click-modal="false"
+      class="workingDialogVisible"
+      @close="handleCloseWorking"
+    >
+      <!--      <div style="margin-bottom: 10px; padding: 10px 0; background-color: #f8f8fa; display: flex">-->
+      <!--        <el-button style="margin-left: 10px;" type="primary" icon="el-icon-circle-plus-outline" @click="addWorking">鏂板</el-button>-->
+      <!--        &lt;!&ndash;        <el-button type="primary" icon="el-icon-delete" @click="delSetting">鍒犻櫎</el-button>&ndash;&gt;-->
+      <!--      </div>-->
+
+      <div style="margin-bottom: 20px;display: flex">
+        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="addWorking">鏂板</el-button>
+        <!--        <el-button type="primary" icon="el-icon-delete" @click="delSetting">鍒犻櫎</el-button>-->
+      </div>
+      <el-table
+        ref="workingTableData"
+        :data="workingTableData"
+        border
+        height="377"
+        highlight-current-row
+        :header-cell-style="this.$headerCellStyle"
+        :cell-style="this.$cellStyle"
+        :row-class-name="tableRowClassName"
+        @sort-change="sortChangeOfWorking"
+      >
+        <!--        :style="{width: 100+'%',height:tableHeight-300+'px'}"-->
+
+        <!--        <el-table-column-->
+        <!--          type="selection"-->
+        <!--          width="50"-->
+        <!--        />-->
+        <el-table-column
+          width="50"
+          label="搴忓彿"
+          prop="RowNum"
+        />
+        <el-table-column
+          prop="group_code"
+          label="鐝粍缂栫爜"
+          sortable="custom"
+          show-tooltip-when-overflow
+        >
+          <template slot-scope="{row}">
+            <el-input
+              v-if="row.isVisible===1"
+              v-model="row.group_code"
+              oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')"
+              placeholder="璇疯緭鍏�"
+            />
+            <div v-else> {{ row.group_code }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="group_name"
+          label="鐝粍鍚嶇О"
+          sortable="custom"
+          show-tooltip-when-overflow
+        >
+          <template slot-scope="{row}">
+            <el-input v-if="row.isVisible===1" v-model="row.group_name" placeholder="璇疯緭鍏�" />
+            <div v-else> {{ row.group_name }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="description"
+          show-tooltip-when-overflow
+          label="鐝粍鎻忚堪"
+          sortable="custom"
+        >
+          <template slot-scope="{row}">
+            <el-input v-if="row.isVisible===1" v-model="row.description" placeholder="璇疯緭鍏�" />
+            <div v-else> {{ row.description }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="鎿嶄綔">
+          <template slot-scope="{row}">
+            <div class="operationClass">
+              <el-button v-if="row.isVisible===0" v-waves type="text" @click="delWorking(row)">鍒犻櫎</el-button>
+              <el-button v-if="row.isVisible===1" v-waves type="text" @click="saveWorking(row)">淇濆瓨</el-button>
+              <el-button v-if="row.isVisible===1" v-waves type="text" @click="cancelWorking(row)">鍙栨秷</el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!--鍒嗛〉-->
+      <pagination
+        :total="workingTableDataLength"
+        :page.sync="formWorking.page"
+        :limit.sync="formWorking.rows"
+        align="right"
+        style="margin-top: 10px"
+        layout="total,prev, pager, next,sizes"
+        popper-class="select_bottom"
+        @pagination="getUserGroupSearch"
+      />
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button v-waves @click="WorkingDialogVisibleCancel">杩斿洖</el-button>
+          <!--          <el-button type="primary" @click="settingDialogVisibleConfirm">纭� 瀹�</el-button>-->
+        </div>
+      </span>
+    </el-dialog>
+
+    <!--瀵煎叆缁勪欢-->
+    <import-picker
+      ref="importPickerFunc"
+      class="importPickerClass"
+      :shows.sync="shows"
+      :title="title_value"
+      :colos="colos"
+      :code="code"
+    />
+
+  </div>
 </template>
 
 <script>
+import Pagination from '@/components/Pagination'
+import ImportPicker from '@/components/ImportPicker'
+import waves from '@/directive/waves/index.js' // 姘存尝绾规寚浠�
+
+import {
+  AddUpdateUser,
+  DeleteUser,
+  SaveUserAssoctRole,
+  UserAssociationRole,
+  UserGroupAdd,
+  UserGroupDelete,
+  UserGroupSearch,
+  UserOrganization,
+  UserSearch
+} from '@/api/jcsz'
+import { getCookie } from '@/utils/auth'
+import $ from 'jquery'
+import clearAllChildren, { validateCode } from '@/utils/global'
+import { MesOrderStepReportSelectUserGroup } from '@/api/scgl'
+import elDragDialog from '@/directive/el-drag-dialog'
+import TableColumnSettings from '@/components/TableColumnSettings'
+
 export default {
-  name: "yhqd"
+  name: 'YYQD',
+  components: {
+    Pagination, ImportPicker, TableColumnSettings
+  },
+  directives: { elDragDialog, waves },
+  data() {
+    const validateMobile = (rule, value, callback) => {
+      if (!value) {
+        callback()
+        // return callback(new Error('璇疯緭鍏ョ數璇濆彿鐮�'))
+      } else {
+        const mobile = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // 闀垮彿
+        const mobile2 = /^[0-9]{6}$/ // 鐭彿
+        if (mobile.test(value) || mobile2.test(value)) {
+          callback()
+          // return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
+        } else {
+          return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
+          // callback()
+        }
+      }
+    }
+    const validateEmail = (rule, value, callback) => {
+      if (!value) {
+        callback()
+        // return callback(new Error('璇疯緭鍏ョ數瀛愰偖绠�'))
+      } else {
+        const email = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/
+        if (email.test(value)) {
+          callback()
+        } else {
+          return callback(new Error('鐢靛瓙閭涓嶇鍚堣鍒�'))
+        }
+      }
+    }
+    return {
+      mouseHoverType: 'mouseout',
+      isExpandForm: false,
+      isIpad: false,
+      mainHeight: 0,
+      tableHeight: 0,
+      form: {
+        UserCode: '', // 鐢ㄦ埛缂栫爜
+        UserName: '', // 鐢ㄦ埛鍚嶇О
+        StuOrg: '', // 鎵�灞炵粍缁�
+        wagetype: '', // 宸ヨ祫绫诲瀷
+        Enable: '', // 鍦ㄨ亴鐘舵��
+        prop: 'lm_date', // 鎺掑簭瀛楁
+        order: 'desc', // 鎺掑簭瀛楁
+        page: 1, // 绗嚑椤�
+        rows: 20 // 姣忛〉澶氬皯鏉�
+      },
+      StuOrgArr: [], // 鎵�灞炵粍缁囨暟缁�
+      StuOrgArr2: [], // 鎵�灞炵粍缁囨暟缁�  瀵硅瘽妗�
+      defaultProps: {
+        checkStrictly: true,
+        value: 'code',
+        label: 'name',
+        children: 'children'
+      },
+      EnableArr: [
+        { value: 'Y', label: '鍦ㄨ亴' },
+        { value: 'N', label: '绂昏亴' }
+      ], // 鍦ㄨ亴鐘舵��
+      total: 10,
+      tableData: [],
+
+      tableColumnSettingsArray: [
+        { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false },
+        { minWidth: 25, width: 50, prop: 'RowNum', label: '搴忓彿', id: 2, show: true, fixed: 'left', sortable: false },
+        {
+          minWidth: 110,
+          width: false,
+          prop: 'usercode',
+          label: '鐢ㄦ埛缂栫爜',
+          id: 3,
+          show: true,
+          fixed: false,
+          sortable: true
+        },
+        {
+          minWidth: 110,
+          width: false,
+          prop: 'username',
+          label: '鐢ㄦ埛鍚嶇О',
+          id: 4,
+          show: true,
+          fixed: false,
+          sortable: true
+        },
+        { minWidth: 110, width: false, prop: 'password', label: '鐢ㄦ埛瀵嗙爜', id: 5, show: true, fixed: false, sortable: 'custom' },
+        { minWidth: 110, width: false, prop: 'stu_torgcode', label: '缁勭粐缂栫爜', id: 6, show: false, fixed: false, sortable: 'custom' },
+        { minWidth: 110, width: false, prop: 'org_name', label: '鎵�灞炵粍缁�', id: 7, show: true, fixed: false, sortable: 'custom' },
+        { minWidth: 110, width: false, prop: 'group_code', label: '鐝粍缂栫爜', id: 8, show: false, fixed: false, sortable: 'custom' },
+        { minWidth: 110, width: false, prop: 'group_name', label: '鐢熶骇鐝粍', id: 9, show: true, fixed: false, sortable: 'custom' },
+        { minWidth: 110, width: false, prop: 'wagetype', label: '宸ヨ祫绫诲瀷', id: 10, show: true, fixed: false, sortable: 'custom' },
+        { minWidth: 110, width: false, prop: 'mobile', label: '鑱旂郴鏂瑰紡', id: 11, show: true, fixed: false, sortable: 'custom' },
+        {
+          minWidth: 110,
+          width: false,
+          prop: 'email',
+          label: '鐢靛瓙閭',
+          id: 12,
+          show: true,
+          fixed: false,
+          sortable: 'custom'
+        },
+        {
+          minWidth: 110,
+          width: false,
+          prop: 'enable',
+          label: '鍦ㄨ亴鐘舵��',
+          id: 13,
+          show: true,
+          fixed: false,
+          sortable: 'custom'
+        },
+        {
+          minWidth: 110,
+          width: false,
+          prop: 'lm_user',
+          label: '鍒涘缓浜哄憳',
+          id: 14,
+          show: true,
+          fixed: false,
+          sortable: 'custom'
+        },
+        {
+          minWidth: 160,
+          width: false,
+          prop: 'lm_date',
+          label: '鍒涘缓鏃堕棿',
+          id: 15,
+          show: true,
+          fixed: false,
+          sortable: 'custom'
+        },
+        {
+          minWidth: 110,
+          width: false,
+          prop: 'is_role',
+          label: '鍏宠仈瑙掕壊',
+          id: 16,
+          show: true,
+          fixed: false,
+          sortable: false
+        }
+      ],
+      tableTimeStampKey: new Date().getTime(), // 琛ㄦ牸key
+
+      dialogVisible: false,
+      dialogForm: {
+        id: '',
+        UserCode: '',
+        UserName: '',
+        Password: '123456',
+        Enable: 'Y',
+        StuOrg: '',
+        Mobile: '',
+        Email: '',
+        groupcode: '',
+        Operator: '',
+        OperType: '',
+        wagetype: '2'
+      },
+      usergroupArr: [], // 鐢熶骇鐝粍鏁扮粍
+      wagetypeArr: [
+        { value: '2', label: '璁′欢鍒�' },
+        { value: '1', label: '璁℃椂鍒�' }
+      ],
+      operation: '',
+      dialogFormRules: {
+        UserCode: [
+          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
+        ],
+        UserName: [
+          { required: true, message: '璇疯緭鍏ョ敤鎴峰悕绉�', trigger: ['blur', 'change'] }
+        ],
+        Password: [
+          { required: true, message: '璇疯緭鍏ョ敤鎴峰瘑鐮�', trigger: ['blur', 'change'] }
+        ],
+        Enable: [
+          { required: true, message: '璇烽�夋嫨鍦ㄨ亴鐘舵��', trigger: ['blur', 'change'] }
+        ],
+        StuOrg: [
+          { required: true, message: '璇烽�夋嫨鎵�灞炵粍缁�', trigger: ['blur', 'change'] }
+        ],
+        wagetype: [
+          { required: true, message: '璇烽�夋嫨宸ヨ祫绫诲瀷', trigger: ['blur', 'change'] }
+        ],
+        groupcode: [
+          { required: true, message: '璇烽�夋嫨鎵�灞炵彮缁�', trigger: ['blur', 'change'] }
+        ],
+        Mobile: [
+          { required: false, validator: validateMobile, trigger: ['blur', 'change'] }
+        ],
+        Email: [
+          { required: false, validator: validateEmail, trigger: ['blur', 'change'] }
+        ]
+
+      },
+      dialogVisibleRoles: false,
+      dialogFormRoles: {
+        username: '', // 鐢ㄦ埛鍚嶇О
+        usercode: '', // 鐢ㄦ埛缂栫爜
+        rolesArr: [], // 瑙掕壊绫诲瀷闆嗗悎
+        rolesArrSelectedArr: [], // 瑙掕壊绫诲瀷闆嗗悎閫変腑
+        roleTree: [], // 瑙掕壊鏍�
+        roleTreeSelectedArr: [] // 瑙掕壊鏍戦�変腑
+      },
+      rolesAll: [], // 瑙掕壊鎵�鏈�
+      defaultPropsOfRoleTree: {
+        value: 'code',
+        label: 'name',
+        children: 'children'
+      },
+      workingDialogVisible: false,
+      workingTableData: [],
+      workingTableDataLength: 0,
+      formWorking: {
+        rows: 10,
+        page: 1,
+        prop: 'group_code',
+        order: 'desc'
+      },
+
+      title_value: '鏁版嵁瀵煎叆 / 鐢ㄦ埛娓呭崟',
+      code: '2',
+      shows: false
+    }
+  },
+  watch: {
+    shows() {
+      if (!this.shows) {
+        this.getUserSearch()
+      }
+    }
+  },
+  created() {
+    this.handleRequest()
+  },
+
+  mounted() {
+    window.addEventListener('resize', this.getHeight)
+    this.getHeight()
+  },
+  methods: {
+    tableColumnUpdate(val, isCopyTrue) {
+      if (isCopyTrue) {
+        this.tableColumnSettingsArray = val
+      }
+      this.tableTimeStampKey = new Date().getTime()
+      this.$refs.tableDataRef.doLayout()
+    },
+    handleRequest() {
+      this.getUserSearch().then(res => {
+        if (res.code === '200') {
+          this.getUserOrganization()
+        }
+      })
+    },
+
+    // 鑾峰彇鐢ㄦ埛娓呭崟
+    async getUserSearch() {
+      const res = await UserSearch(this.form)
+      this.tableData = res.data
+      this.total = res.count
+      return { code: res.code }
+    },
+    // 鑾峰彇鎵�灞炵粍缁�
+    async getUserOrganization() {
+      const { data: res } = await UserOrganization()
+      this.StuOrgArr = clearAllChildren(res)
+    },
+    // 鑾峰彇鎵�灞炵粍缁囧璇濇
+    async getUserOrganization2() {
+      const { data: res } = await UserOrganization()
+      this.StuOrgArr2 = clearAllChildren(res)
+    },
+    // 瀵煎叆鎸夐挳
+    upload() {
+      this.shows = true
+      this.$refs.importPickerFunc.newDataFunc()
+    },
+    colos() {
+      this.shows = false
+    },
+    // 鎺掑簭鏀瑰彉鏃�
+    sortChange({ column, prop, order }) {
+      if (order === 'descending') {
+        order = 'desc'
+      } else if (order === 'ascending') {
+        order = 'asc'
+      } else {
+        order = 'desc'
+      }
+      this.form.order = order
+      this.form.prop = prop
+      this.getUserSearch()
+    },
+    // 鏌ヨ
+    search() {
+      this.getUserSearch()
+    },
+    // 閲嶇疆
+    reset() {
+      this.form.UserCode = ''
+      this.form.UserName = ''
+      this.form.StuOrg = ''
+      this.form.Enable = 'Y'
+      this.form.wagetype = ''
+      this.$refs.cascader.checkedValue = ''// 绾ц仈閫夋嫨鍣ㄧ殑娓呯┖
+      this.getUserSearch()
+    },
+    // 绾ц仈閫夋嫨鍣ㄦ敼鍙樹簨浠�
+    cascaderChange(val) {
+      this.form.StuOrg = val[val.length - 1]
+    },
+    dialogCascaderChange(val) {
+      this.dialogForm.StuOrg = val[val.length - 1]
+    },
+    // 鑾峰彇涓嬫媺鐢熶骇鐝粍
+    async getMesOrderStepReportSelectUserGroup() {
+      const { data: res } = await MesOrderStepReportSelectUserGroup()
+      this.usergroupArr = res
+    },
+    // 鏂板鎸夐挳
+    add(operation) {
+      this.operation = operation
+      this.dialogVisible = true
+      this.getUserOrganization2()
+      this.getMesOrderStepReportSelectUserGroup()
+    },
+    // 淇敼鎸夐挳
+    edit(operation, row) {
+      this.operation = operation
+      this.dialogVisible = true
+      console.log(row)
+
+      this.$nextTick(() => {
+        this.dialogForm.id = row.id
+        this.dialogForm.UserCode = row.usercode
+        this.dialogForm.UserName = row.username
+        this.dialogForm.Password = row.password
+        this.dialogForm.groupcode = row.group_code
+        this.dialogForm.Enable = row.enable
+        this.dialogForm.StuOrg = row.stu_torgcode
+        this.$refs.dialogCascader.checkedValue = row.stu_torgcode
+        this.dialogForm.Mobile = row.mobile
+        this.dialogForm.Email = row.email
+        this.dialogForm.wagetype = row.wagetype
+      })
+      this.getMesOrderStepReportSelectUserGroup()
+      this.getUserOrganization2()
+    },
+    // 鍒犻櫎鎸夐挳
+    async del(id) {
+      this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        DeleteUser({ Userid: id }).then(res => {
+          if (res.code === '200') {
+            this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.form.page > 1 && this.tableData.length === 1) {
+              this.form.page--
+            }
+            this.getUserSearch()
+          }
+        })
+      }).catch(() => {
+        this.$message.info('宸插彇娑堝垹闄�')
+      })
+    },
+    // 瀵硅瘽妗嗗叧闂簨浠�
+    handleClose() {
+      this.dialogForm.UserCode = ''
+      this.dialogForm.UserCode = ''
+      this.dialogForm.UserName = ''
+      this.dialogForm.Password = '123456'
+      this.dialogForm.Enable = 'Y'
+      this.$refs.dialogCascader.checkedValue = ''
+      this.dialogForm.StuOrg = ''
+      this.dialogForm.Mobile = ''
+      this.dialogForm.Email = ''
+      this.dialogForm.groupcode = ''
+      this.dialogForm.wagetype = '2'
+      this.$refs.dialogForm.clearValidate()
+    },
+    // 瀵硅瘽妗嗗彇娑�
+    dialogVisibleCancel() {
+      this.dialogVisible = false
+    },
+    // 瀵硅瘽妗嗙‘璁�
+    dialogVisibleConfirm() {
+      this.$refs.dialogForm.validate(valid => {
+        if (valid) {
+          this.$store.state.app.buttonIsDisabled = true
+          const data = {
+            id: this.dialogForm.id,
+            UserCode: this.dialogForm.UserCode,
+            UserName: this.dialogForm.UserName,
+            Password: this.dialogForm.Password,
+            Enable: this.dialogForm.Enable,
+            // StuOrg: this.dialogForm.StuOrg,
+            StuOrg: Array.isArray(this.$refs.dialogCascader.checkedValue) ? this.$refs.dialogCascader.checkedValue[this.$refs.dialogCascader.checkedValue.length - 1] : this.$refs.dialogCascader.checkedValue,
+            Mobile: this.dialogForm.Mobile,
+            Email: this.dialogForm.Email,
+            groupcode: this.dialogForm.groupcode,
+            wagetype: this.dialogForm.wagetype,
+            OperType: this.operation === 'add' ? 'Add' : 'Update',
+            Operator: getCookie('admin')
+          }
+          AddUpdateUser(data).then(res => {
+            if (res.code === '200') {
+              this.dialogVisible = false
+              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
+              this.getUserSearch()
+              this.$store.state.app.buttonIsDisabled = false
+            } else {
+              this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
+              this.$store.state.app.buttonIsDisabled = false
+            }
+          })
+        }
+      })
+    },
+    // 鑾峰彇椤甸潰楂樺害
+    getHeight() {
+      this.$nextTick(() => {
+        // this.mainHeight = window.innerHeight - 250
+        this.mainHeight = window.innerHeight - 85
+        this.tableHeight = this.mainHeight - 255
+        if (window.innerHeight < 769) {
+          this.tableHeight = this.tableHeight - 40
+        }
+        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+        this.$refs.tableDataRef.doLayout()
+      })
+    },
+    // 鍏宠仈瑙掕壊鐐瑰嚮浜嬩欢
+    roleClick({ row }) {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+
+      this.dialogFormRoles.rolesArrSelectedArr = []
+      this.dialogFormRoles.rolesArr = []
+      this.dialogFormRoles.roleTreeSelectedArr = []
+
+      this.dialogFormRoles.username = row.username
+      this.dialogFormRoles.usercode = row.usercode
+      UserAssociationRole({ usercode: row.usercode }).then(res => {
+        if (res.code === '200') {
+          setTimeout(() => {
+            loading.close()
+
+            this.dialogVisibleRoles = true
+            this.rolesAll = res.data.filter(item => item.children.length !== 0)
+
+            const nodeKey = []// 鏍戝舰鍥炴樉key
+            this.rolesAll.forEach((item, index) => {
+              this.dialogFormRoles.rolesArr.push({
+                code: item.code,
+                name: item.name,
+                flag: item.flag,
+                isSelected1: false,
+                isSelected2: false
+              })
+              if (item.flag === 'Y') {
+                this.dialogFormRoles.rolesArr[index].isSelected2 = true
+                this.$nextTick(() => {
+                  // $('input:checkbox').eq(index).attr('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+                  $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+                })
+                this.dialogFormRoles.rolesArrSelectedArr.push(item.name)
+                if (item.children && item.children.length > 0) {
+                  const Data = []
+                  item.children.forEach(it => {
+                    if (it.flag === 'Y') {
+                      nodeKey.push(it.code)
+                      Data.push(it.code)
+                    }
+                  })
+                  this.dialogFormRoles.roleTreeSelectedArr.push({ Code: item.code, Name: item.name, Data: Data })
+                }
+              }
+            })
+
+            this.dialogFormRoles.rolesArr[0].isSelected1 = true// 榛樿閫変腑绗竴涓�
+
+            this.dialogFormRoles.roleTree = this.rolesAll.filter(item => item.code === this.dialogFormRoles.rolesArr[0].code)
+            this.dialogFormRoles.roleTree[0].name = '鍏ㄩ儴'
+
+            this.$nextTick(() => {
+              this.$refs.roleTree.setCheckedKeys(nodeKey)
+            })
+          }, 1000)
+        } else {
+          loading.close()
+        }
+      })
+    },
+    // 澶勭悊鐢ㄦ埛鍏宠仈瀵硅瘽妗嗗叧闂簨浠�
+    handleCloseRoles() {
+      this.$refs.roleTree.setCheckedKeys([])
+      this.dialogFormRoles.rolesArrSelectedArr = []
+    },
+    // 鐢ㄦ埛鍏宠仈瀵硅瘽妗嗗彇娑堜簨浠�
+    rolesDialogVisibleCancel() {
+      this.dialogVisibleRoles = false
+    },
+    // 鐢ㄦ埛鍏宠仈瀵硅瘽妗嗙‘璁や簨浠�
+    async rolesDialogVisibleConfirm() {
+      this.$store.state.app.buttonIsDisabled = true
+      const res = await SaveUserAssoctRole(this.dialogFormRoles.roleTreeSelectedArr, this.dialogFormRoles.usercode)
+      if (res.code === '200') {
+        this.dialogVisibleRoles = false
+        this.$message.success('淇濆瓨鎴愬姛锛�')
+        await this.getUserSearch()
+        this.$store.state.app.buttonIsDisabled = false
+      } else {
+        this.$store.state.app.buttonIsDisabled = false
+      }
+    },
+    // 鏍戝舰澶嶉�夋鐐瑰嚮浜嬩欢
+    checkBoxClick(obj, { checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys }) {
+      // console.log(obj, checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys, 78787878)
+
+      // 鎵惧埌 checkedFatherCode  鐖禼ode鍊�
+      // 褰揾alfCheckedKeys涓嶇瓑绛夐浂鐨勬椂鍊�
+      // let checkedFatherCode = halfCheckedKeys.length !== 0 ? halfCheckedKeys[0] : checkedKeys[0]
+      let checkedFatherCode = '' // 鎵惧埌 checkedFatherCode  鐖禼ode鍊�
+      // if (checkedFatherCode === undefined) {
+      // console.log(this.rolesAll, 66666)
+      this.rolesAll.forEach((item, index) => {
+        if (item.code === obj.code) {
+          checkedFatherCode = item.code
+        }
+        if (item.children && item.children.length > 0) {
+          item.children.forEach((it, ind) => {
+            if (it.code === obj.code) {
+              checkedFatherCode = item.code
+            }
+          })
+        }
+      })
+
+      // }
+      console.log(checkedFatherCode, 8)
+
+      // 1.绗竴绉嶆儏鍐靛綋鏍戝舰   鍗婂彾 涓嶄负闆�   鍏ㄥ彾 涓嶄负闆�
+      if (halfCheckedKeys.length !== 0 && checkedKeys.length !== 0) {
+        this.dialogFormRoles.rolesArr.forEach((item, index) => {
+          if (item.code === checkedFatherCode) {
+            console.log('1.绗竴绉嶆儏鍐靛綋鏍戝舰   鍗婂彾 涓嶄负闆�   鍏ㄥ彾 涓嶄负闆�')
+            this.dialogFormRoles.rolesArr[index].isSelected2 = true
+            this.$nextTick(() => {
+              // $('input:checkbox').eq(index).attr('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+            })
+            const temp = this.rolesAll.filter(it => it.code === checkedFatherCode)// 杩囨护鍑烘瘡娆¢�変腑鐨勫ぇ椤�
+            temp.forEach(it => {
+              const a = []
+              it.children.forEach(it => {
+                if (it.code === obj.code) {
+                  a.push(it.code)
+                }
+              })
+              // console.log(!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode))
+              if (!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode)) { // 褰撶洿鎺ラ�夌埗code鏃舵墽琛�
+                this.dialogFormRoles.roleTreeSelectedArr.push({
+                  Code: it.code,
+                  Name: it.name,
+                  Data: a
+                })
+              } else {
+                this.dialogFormRoles.roleTreeSelectedArr.forEach((i, ind) => { // 褰撻�夊瓙code鏃舵墽琛�
+                  if (i.Code === checkedFatherCode) {
+                    this.dialogFormRoles.roleTreeSelectedArr[ind].Data.forEach((i1, ind2) => {
+                      if (i1 === a[0]) {
+                        // this.dialogFormRoles.roleTreeSelectedArr[ind].Data.splice(ind2, 1)// 褰撳瓙code涓庣幇鍦ㄧ殑code鐩稿悓鏃舵墽琛�
+                        this.dialogFormRoles.roleTreeSelectedArr[ind].Data = this.dialogFormRoles.roleTreeSelectedArr[ind].Data.filter(i2 => i2 !== a[0])
+                      } else {
+                        this.dialogFormRoles.roleTreeSelectedArr[ind].Data.push(a[0])// //褰撳瓙code涓庣幇鍦ㄧ殑code涓嶇浉鍚屾椂鎵ц
+                      }
+                    })
+                    // this.dialogFormRoles.roleTreeSelectedArr[ind].Data.filter((i1, ind2) => i1 !== a[0])// 杩囨护鎺夐�変腑鐩稿悓鐨�
+                  }
+                })
+              }
+            })
+          }
+        })
+      }
+
+      console.log(this.dialogFormRoles.roleTreeSelectedArr, 11)
+
+      // 2.绗簩绉嶆儏鍐靛綋鏍戝舰   鍗婂彾 涓洪浂   鍏ㄥ彾 涓洪浂
+      if (halfCheckedKeys.length === 0 && checkedKeys.length === 0) {
+        this.dialogFormRoles.rolesArr.forEach((item, index) => {
+          if (item.code === checkedFatherCode) {
+            console.log('2.绗簩绉嶆儏鍐靛綋鏍戝舰   鍗婂彾 涓洪浂   鍏ㄥ彾 涓洪浂')
+            this.dialogFormRoles.rolesArr[index].isSelected2 = false
+            this.$nextTick(() => {
+              // console.log($('input:checkbox').eq(1).attr('checked', false), 88888)
+              $('input:checkbox').eq(index).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+            })
+            this.dialogFormRoles.roleTreeSelectedArr.forEach((it, ind) => {
+              if (it.Code === checkedFatherCode) {
+                console.log(it.Code, 9)
+                this.dialogFormRoles.roleTreeSelectedArr.splice(ind, 1)
+              }
+            })
+            this.dialogFormRoles.rolesArrSelectedArr.forEach((i, i1) => {
+              if (i === checkedFatherCode) {
+                this.dialogFormRoles.rolesArrSelectedArr.splice(i1, 1)
+              }
+            })
+          }
+        })
+      }
+      console.log(this.dialogFormRoles.roleTreeSelectedArr, 22)
+
+      // 3.绗笁绉嶇鎯呭喌褰撴爲褰�   鍗婂彾 涓洪浂   鍏ㄥ彾 涓嶄负闆�
+      if (halfCheckedKeys.length === 0 && checkedKeys.length !== 0) {
+        // this.dialogFormRoles.roleTreeSelectedArr = []
+        this.dialogFormRoles.rolesArr.forEach((item, index) => {
+          if (item.code === checkedFatherCode) {
+            console.log(' 3.绗笁绉嶇鎯呭喌褰撴爲褰�   鍗婂彾 涓洪浂   鍏ㄥ彾 涓嶄负闆�')
+            this.dialogFormRoles.rolesArr[index].isSelected2 = true
+            this.$nextTick(() => {
+              // $('input:checkbox').eq(index).attr('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+              $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+            })
+          }
+        })
+
+        const temp = this.rolesAll.filter(it => it.code === checkedFatherCode)// 杩囨护鍑烘瘡娆¢�変腑鐨勫ぇ椤�
+        // console.log(!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode))
+        if (!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode)) { // 褰撶埗绫讳负鍏ㄥ彾鏃�
+          temp.forEach(it => {
+            this.dialogFormRoles.roleTreeSelectedArr.push({
+              Code: it.code,
+              Name: it.name,
+              Data: it.children.map(i => i.code)
+            })
+          })
+        } else { // 褰撶埗绫荤敱鍗婂彾鍙樹负鍏ㄥ彾鏃�
+          this.dialogFormRoles.roleTreeSelectedArr.forEach((i1, ind) => {
+            if (i1.Code === checkedFatherCode) { // i1娌℃壘瀵�
+              this.dialogFormRoles.roleTreeSelectedArr.splice(ind, 1)
+              temp.forEach(it => {
+                this.dialogFormRoles.roleTreeSelectedArr.push({
+                  Code: it.code,
+                  Name: it.name,
+                  Data: it.children.map(i => i.code)
+                })
+              })
+            }
+          })
+        }
+      }
+    },
+    // myCheckBox鐐瑰嚮浜嬩欢    澶х洅瀛愮偣鍑�
+    myCheckboxClick(item) {
+      console.log(this.dialogFormRoles.rolesArr, 7)
+      this.dialogFormRoles.rolesArr.forEach(it => {
+        it.isSelected1 = it.code === item.code
+      })
+      this.dialogFormRoles.roleTree = this.rolesAll.filter(it => it.code === item.code)
+      this.dialogFormRoles.roleTree[0].name = '鍏ㄩ儴'
+      if (this.dialogFormRoles.roleTree[0].children.length < 1) {
+        this.dialogFormRoles.roleTree = ''
+      }
+      const temp = this.dialogFormRoles.roleTreeSelectedArr.filter(it => it.Code === item.code)
+      console.log(temp, 33)
+      if (temp.length > 0) {
+        this.$refs.roleTree.setCheckedKeys(temp[0].Data)// 鏍戝舰閫変腑鍥炴樉
+      } else {
+        this.$refs.roleTree.setCheckedKeys([])// 褰撻暱搴︿负闆舵椂缃┖
+      }
+    },
+    // myCheckBoxInput鐐瑰嚮浜嬩欢  灏忕洅瀛愮偣鍑�(input)
+    myCheckboxInputClick(item) {
+      item.isSelected2 = !!item.isSelected2
+      this.dialogFormRoles.rolesArrSelectedArr = [...new Set(this.dialogFormRoles.rolesArrSelectedArr)]// 鏁扮粍鍘婚噸
+      if (item.isSelected2) { // 浠庢病閫変腑鍒伴�変腑
+        console.log('浠庢病閫変腑鍒伴�変腑')
+        this.dialogFormRoles.rolesArr.forEach(it => {
+          if (it.code === item.code && item.isSelected2) {
+            this.dialogFormRoles.rolesArrSelectedArr.push(it.code)
+          }
+        })
+
+        const temp = this.rolesAll.filter(it => it.code === item.code)// 杩囨护鍑烘瘡娆¢�変腑鐨勫ぇ椤�
+
+        temp.forEach(it => {
+          this.dialogFormRoles.roleTreeSelectedArr.push({
+            Code: it.code,
+            Name: it.name,
+            Data: it.children.map(i => i.code)
+          })
+        })
+      }
+
+      if (!item.isSelected2) { // 浠庨�変腑鍒版病閫変腑
+        console.log('浠庨�変腑鍒版病閫変腑')
+        this.dialogFormRoles.rolesArr.forEach((it, ind) => {
+          if (it.code === item.code && !item.isSelected2) {
+            console.log('杩涙潵浜�')
+            console.log(this.dialogFormRoles.rolesArrSelectedArr, 78)
+            this.dialogFormRoles.rolesArrSelectedArr.forEach((i, i1) => {
+              if (i === it.code) {
+                this.dialogFormRoles.rolesArrSelectedArr.splice(i1, 1)
+              }
+            })
+            this.dialogFormRoles.roleTreeSelectedArr.forEach((i, i1) => {
+              if (i.Code === it.code) {
+                this.dialogFormRoles.roleTreeSelectedArr.splice(i1, 1)
+              }
+            })
+          }
+        })
+      }
+
+      this.$refs.roleTree.setCheckedKeys(this.dialogFormRoles.rolesArrSelectedArr)
+      // this.$refs.roleTree.getCheckedKeys()//鍙兘鑾峰彇鍒扮涓�涓爲褰�
+
+      this.dialogFormRoles.rolesArrSelectedArr = [...new Set(this.dialogFormRoles.rolesArrSelectedArr)]// 鏁扮粍鍘婚噸
+      // 鏁扮粍涓璞$浉鍚岀殑鍘婚噸
+      // this.dialogFormRoles.roleTreeSelectedArr = this.dialogFormRoles.roleTreeSelectedArr.filter((currentValue, currentIndex, selfArr) => {
+      //   return selfArr.findIndex(item => item.code === currentValue.Code) === currentIndex
+      // })
+      console.log(this.dialogFormRoles.rolesArrSelectedArr, 6666)
+      console.log(this.dialogFormRoles.roleTreeSelectedArr, 6777)
+    },
+
+    /*
+      鐢熶骇鐝粍妯″潡
+   */
+    // 鐢熶骇鐝粍鎸夐挳鐐瑰嚮
+    workingTramClick() {
+      this.workingDialogVisible = true
+      this.getUserGroupSearch()
+      // 椤甸潰鍔犺浇瀹屽悗閲嶆柊娓叉煋琛ㄦ牸
+      this.$nextTick(() => {
+        this.$refs.workingTableData.doLayout()
+      })
+    },
+    // 鐢熶骇鐝粍瀵硅瘽妗嗗叧闂簨浠�
+    handleCloseWorking() {
+      this.workingTableData.forEach((item, index) => {
+        if (item.isVisible === 1) {
+          this.workingTableData.splice(index, 1)
+        }
+      })
+      this.getMesOrderStepReportSelectUserGroup()
+    },
+    // 鐢熶骇鐝粍鎺掑簭
+    sortChangeOfWorking({ column, prop, order }) {
+      if (order === 'descending') {
+        order = 'desc'
+      } else if (order === 'ascending') {
+        order = 'asc'
+      } else {
+        order = 'desc'
+      }
+      this.form.order = order
+      this.form.prop = prop
+      this.getUserGroupSearch()
+    },
+    // 鑾峰彇鐢熶骇鐝粍鍒楄〃
+    async getUserGroupSearch() {
+      const res = await UserGroupSearch(this.formWorking)
+      this.workingTableData = res.data
+      this.workingTableDataLength = res.count
+      this.workingTableData.forEach(item => {
+        item.isVisible = 0
+      })
+    },
+    // 鏂板
+    addWorking() {
+      if (this.workingTableData.find(i => i.isVisible === 1)) {
+        return this.$message.info('璇峰厛淇濆瓨涓婁竴琛岃褰曪紒')
+      }
+
+      let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+      number = number === 0 ? (10 + Math.random()) : number
+      const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number }
+      this.workingTableData.unshift(data)
+    },
+    // 鍒犻櫎
+    delWorking(row) {
+      this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        UserGroupDelete({ UserGrupCode: row.group_code }).then(res => {
+          if (res.code === '200') {
+            this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.formWorking.page > 1 && this.workingTableData.length === 1) {
+              this.formWorking.page--
+            }
+            this.getUserGroupSearch()
+          }
+        })
+      }).catch(() => {
+        this.$message.info('宸插彇娑堝垹闄�')
+      })
+    },
+    // 淇濆瓨
+    async saveWorking(row) {
+      if (row.group_code.trim().length < 1) {
+        return this.$message.info('鐝粍缂栫爜涓嶈兘涓虹┖锛�')
+      }
+      if (row.group_name.trim().length < 1) {
+        return this.$message.info('鐝粍鍚嶇О涓嶈兘涓虹┖锛�')
+      }
+      // if (row.description.trim().length < 1) {
+      //   return this.$message.info('鐝粍鎻忚堪涓嶈兘涓虹┖锛�')
+      // }
+      const data = {
+        code: row.group_code,
+        name: row.group_name,
+        flag: row.description
+      }
+      const res = await UserGroupAdd([data])
+      if (res.code === '200') {
+        this.$message.success('淇濆瓨鎴愬姛锛�')
+        await this.getUserGroupSearch()
+      }
+    },
+    // 鍙栨秷
+    cancelWorking(row) {
+      this.workingTableData.forEach((item, index) => {
+        if (item.isVisible === 1 && item.number === row.number) {
+          this.workingTableData.splice(index, 1)
+        }
+      })
+    },
+    // 鐢熶骇鐝粍杩斿洖鎸夐挳
+    WorkingDialogVisibleCancel() {
+      this.workingDialogVisible = false
+    },
+    tableRowClassName({ row, rowIndex }) {
+      // console.log(row, rowIndex, 12)
+      // if (rowIndex === 1) {
+      //   return 'warning-row'
+      // } else if (rowIndex === 3) {
+      //   return 'success-row'
+      // }
+      return 'custom-row'
+    }
+
+  }
 }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
+$main_color: #42b983;
 
+.dialogVisibleRoles {
+  .myCheckboxGroup {
+    display: flex;
+    flex-wrap: wrap;
+
+    .myCheckbox {
+      border: 1px solid #eee;
+      display: flex;
+      min-width: 100px;
+      padding: 10px;
+      margin: 10px 30px 0 0;
+      border-radius: 5px;
+      cursor: default;
+      position: relative;
+
+      .myCheckboxInput {
+        margin: 1px 5px 0 0;
+        cursor: pointer;
+      }
+
+      .myCheckboxInputLabel {
+        position: absolute;
+        left: 29px;
+        padding: 5px;
+        top: 6px;
+        color: transparent;
+      }
+    }
+
+    input[type=checkbox] {
+      cursor: pointer;
+      position: relative;
+      width: 14px;
+      height: 14px;
+      font-size: 14px;
+    }
+
+    input[type=checkbox]::after {
+      position: absolute;
+      top: 0;
+      color: $main_color;
+      width: 14px;
+      height: 14px;
+      display: inline-block;
+      visibility: visible;
+      padding-left: 0;
+      text-align: center;
+      content: ' ';
+      border-radius: 3px
+    }
+
+    input[type=checkbox]:checked::after {
+      content: "鉁�";
+      //content: "鈭�";
+      color: #fff;
+      font-size: 12px;
+      font-weight: bold;
+      background-color: $main_color;
+    }
+  }
+}
+
+.workingDialogVisible ::v-deep .el-dialog__body {
+  padding: 20px 20px !important;
+}
+</style>
+
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+::v-deep .el-button--text {
+  font-size: 14px;
+  cursor: pointer;
+}
+
+.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
+  color: $main_color;
+  cursor: pointer;
+}
+
+.el-icon-edit-outline {
+  margin-right: 15px;
+}
+
+::v-deep .el-button--primary, .el-button--default, .el-button--info {
+  height: 34px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+}
+
+::v-deep .el-button--primary {
+  //background-color: $main_color !important;
+}
+
+::v-deep .el-button--default {
+  background-color: #f8f8fa;
+  border: none;
+}
+
+::v-deep .el-input__inner {
+  height: 34px;
+  line-height: 34px;
+  //color: #a7a7a7;
+}
+
+::v-deep .el-dialog__body {
+  padding: 20px 100px !important;
+}
+
+::v-deep .dialogVisibleRoles .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .importPickerClass .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .el-dialog__footer {
+  display: flex;
+  justify-content: flex-end;
+}
+
+::v-deep .el-table .caret-wrapper {
+  transform: scale(0.8);
+}
+
+::v-deep .cell {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+::v-deep .el-table::before {
+  height: 0;
+}
+
+::v-deep .el-table__body-wrapper {
+  background-color: #f8f8fa;
+}
+
+::v-deep .el-table__body .el-table__row.hover-row td {
+  background-color: #eaecef;
+}
+
+::v-deep .el-form--inline .el-form-item__label {
+  color: #a7a7a7;
+}
+
+.body ::v-deep .el-divider {
+  border: 1px solid #eee;
+  width: 99%;
+  margin: 10px auto;
+}
+
+.body ::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+
+.tableFixed {
+  ::v-deep .el-table__fixed-right {
+    height: 100% !important;
+  }
+
+  ::v-deep .el-table__fixed {
+    height: 100% !important;
+  }
+}
+
+</style>
+<style>
+.osloading {
+  font-size: 26px !important;
+}
+
+.el-loading-text {
+  font-size: 26px !important;
+}
+
+.el-table .custom-row {
+  background: #f8f8fa;
+}
 </style>

--
Gitblit v1.9.3