index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. <template>
  2. <div class="newUserManagement">
  3. <div class="flex-wrap newUserManagement-content">
  4. <div class="newUserManagement-content-left">
  5. <!-- <div class="head flex">
  6. <div class="title">账号组列表</div>
  7. <el-button @click="handleAdd" class="serButton" type="primary" plain size="small">新增</el-button>
  8. </div>
  9. <div class="contents">
  10. <el-scrollbar ref="scroll" style="height: 100%">
  11. <el-tree :data="data" :props="defaultProps" :expand-on-click-node="false" highlight-current node-key="user_group_id" default-expand-all @node-click="handleNodeClick">
  12. <span class="custom-tree-node" slot-scope="{ node, data }">
  13. <span class="customTxt">{{ node.label }}</span>
  14. <span v-show="treeCheckId == data.user_group_id" class="customBtn">
  15. <span v-if="data.user_group_id != 0" @click.stop="handleRemove(node, data)">删除</span>
  16. </span>
  17. </span>
  18. </el-tree>
  19. </el-scrollbar>
  20. </div> -->
  21. <div class="newService-content-left-top">
  22. <div class="flex head">
  23. <div class="title">账号组列表</div>
  24. <el-button @click="handleAdd" class="serButton" size="small">新增</el-button>
  25. </div>
  26. <div class="search">
  27. <el-input size="small" placeholder="请输入内容" clearable prefix-icon="el-icon-search" :filter-node-method="filterArrNode" v-model="search">
  28. </el-input>
  29. </div>
  30. </div>
  31. <div class="newService-content-left-bottom">
  32. <template v-if="dataList.length">
  33. <el-scrollbar ref="scroll" style="height: 100%">
  34. <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
  35. <!-- <div v-for="(item,index) in dataList" :key="index" @click.stop="handleNodeClick(item,index)" :class="index == activeIndex ? 'active':''" class="contents flex">
  36. <div class="left">
  37. <span class="txt">{{ item.user_group_name }}</span>
  38. </div>
  39. <div v-show="activeIndex == index" class="right">
  40. <span @click.stop="handleRemove(item)" class="error">删除</span>
  41. </div>
  42. </div> -->
  43. <el-tree ref="treeArr" :data="arrs" :props="defaultArrProps" highlight-current :filter-node-method="filterArrNode" default-expand-all node-key="user_group_id" @node-click="handleNodeClick" :expand-on-click-node="false">
  44. <span class="custom-tree-node" slot-scope="{ node,data }">
  45. <div class="flex">
  46. <span class="customTxt">{{ node.label }}</span>
  47. <span v-show="treeCheckId == data.user_group_id" class="customBtn">
  48. <span v-if="data.user_group_id" @click.stop="handleRemove(data)">删除</span>
  49. </span>
  50. </div>
  51. </span>
  52. </el-tree>
  53. </div>
  54. </el-scrollbar>
  55. </template>
  56. <template v-else>
  57. <el-empty description="暂无数据"></el-empty>
  58. </template>
  59. </div>
  60. </div>
  61. <div class="newUserManagement-content-right flex1">
  62. <div class="newUserManagement-content-right-top">
  63. <div class="head flex">
  64. <div class="title">账号组信息</div>
  65. <el-button @click="handleSave" type="primary" size="small">保存</el-button>
  66. </div>
  67. <div class="contents">
  68. <el-form :inline="true" :rules="rules" ref="form" :model="formInline" class="demo-form-inline">
  69. <el-form-item prop="user_group_name" label="账号组名称">
  70. <el-input style="width:260px;margin-right: 30px;" size="small" v-model="formInline.user_group_name" placeholder="请输入账号组名称"></el-input>
  71. </el-form-item>
  72. <el-form-item prop="up_user_group_name" label="上级用户组">
  73. <el-select style="width:260px;margin-right: 30px;" size="small" clearable v-model="formInline.up_user_group_id" placeholder="请选择上级用户组">
  74. <el-option v-for="item in arrTree" :key="item.user_group_id" :label="item.user_group_name" :value="item.user_group_id">
  75. </el-option>
  76. </el-select>
  77. </el-form-item>
  78. <el-form-item label="描述">
  79. <el-input style="width:260px;" size="small" v-model="formInline.user_group_comment" placeholder="请输入描述"></el-input>
  80. </el-form-item>
  81. </el-form>
  82. </div>
  83. </div>
  84. <div class="newUserManagement-content-right-bottom">
  85. <div class="head flex">
  86. <div class="title">账号列表</div>
  87. <el-button @click="handleTableAdd" type="primary" size="small">新增</el-button>
  88. </div>
  89. <div class="contents">
  90. <el-table :data="tableData" height="100%" border style="width: 100%">
  91. <el-table-column prop="user_name" label="用户名">
  92. </el-table-column>
  93. <el-table-column prop="user_status" label="状态">
  94. <template slot-scope="scope">
  95. <div>{{ scope.row.user_status ? '启用' :'禁用' }}</div>
  96. </template>
  97. </el-table-column>
  98. <!-- <el-table-column prop="token_valid_duration" label="令牌有效时长">
  99. </el-table-column> -->
  100. <el-table-column prop="user_comment" label="描述">
  101. </el-table-column>
  102. <el-table-column label="操作" width="235">
  103. <template slot-scope="scope">
  104. <el-button @click="handleTablepaswod(scope.row)" type="primary" plain size="small">修改密码 </el-button>
  105. <el-button @click="handleTableEdit(scope.row)" type="primary" plain size="small">编辑 </el-button>
  106. <!-- <el-button @click="handleTableAuth(scope.row)" type="primary" plain size="small">账号授权 </el-button> -->
  107. <el-button @click="handleTableDel(scope.row)" type="danger" size="small">删除 </el-button>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <Dialog :flag="paswordFlag">
  116. <div class="dialog-content">
  117. <div class="title">{{ dataTitle }}</div>
  118. <div class="contents">
  119. <el-form ref="ruleForms" :model="ruleForm" :rules="tableRules" label-width="100px" class="demo-ruleForm">
  120. <el-form-item label="账号密码" prop="user_pwd">
  121. <div class="flex-wrap">
  122. <el-input v-model="ruleForm.user_pwd" class="r25" size="small" placeholder="请输入密码" />
  123. <el-button size="small" @click="restPwd" style="position: relative;top: 4px;" class="r26" type="primary">生成密码</el-button>
  124. </div>
  125. </el-form-item>
  126. </el-form>
  127. </div>
  128. <div class="foot right">
  129. <el-button size="small" @click="handleOkSk('ruleForms')" class="r24" type="primary">确定</el-button>
  130. <el-button @click="eledite" size="small">取消</el-button>
  131. </div>
  132. </div>
  133. </Dialog>
  134. <Dialog :flag="tableFlag">
  135. <div class="dialog-content">
  136. <div class="title">{{ dataTitle }}</div>
  137. <div class="contents">
  138. <el-form ref="ruleForm" :model="ruleForm" :rules="tableRules" label-width="100px" class="demo-ruleForm">
  139. <el-form-item label="账号组关联" prop="user_gropu_id">
  140. <el-select style="width: 100%" size="small" v-model="ruleForm.user_group_id" placeholder="请选择">
  141. <el-option v-for="item in arrTree" :key="item.user_group_id" :label="item.user_group_name" :value="item.user_group_id"> </el-option>
  142. </el-select>
  143. </el-form-item>
  144. <el-form-item label="账号名称" prop="user_name">
  145. <el-input v-model="ruleForm.user_name" size="small" placeholder="请输入账号名称" />
  146. </el-form-item>
  147. <!-- <el-form-item label="账号密码" prop="user_pwd">
  148. <div class="flex-wrap">
  149. <el-input v-model="ruleForm.user_pwd" class="r25" size="small" placeholder="请输入密码" />
  150. <el-button size="small" @click="restPwd" style="position: relative;top: 4px;" class="r26" type="primary">生成密码</el-button>
  151. </div>
  152. </el-form-item> -->
  153. <el-form-item label="二级密码" prop="user_sec_pwd">
  154. <el-input v-model="ruleForm.user_sec_pwd" size="small" placeholder="请输入二级密码" />
  155. </el-form-item>
  156. <!-- <el-form-item label="令牌有限期" prop="token_valid_duration">
  157. <el-input v-model="ruleForm.token_valid_duration" size="small" placeholder="请输入令牌有限期(小时)" />
  158. </el-form-item> -->
  159. <el-form-item label="账号描述" prop="user_comment">
  160. <el-input v-model="ruleForm.user_comment" size="small" type="textarea" :rows="3" placeholder="请输入账号描述" />
  161. </el-form-item>
  162. <el-form-item label="是否启用" prop="user_status">
  163. <el-radio v-model="ruleForm.user_status" :label="2">是</el-radio>
  164. <el-radio v-model="ruleForm.user_status" :label="0">否</el-radio>
  165. </el-form-item>
  166. </el-form>
  167. </div>
  168. <div class="foot right">
  169. <el-button size="small" @click="handleOk('ruleForm')" class="r24" type="primary">确定</el-button>
  170. <el-button @click="eledite" size="small">取消</el-button>
  171. </div>
  172. </div>
  173. </Dialog>
  174. <Dialog :flag="dialogFlag" class="dialog-check-group">
  175. <div class="dialog-wrapper">
  176. <div class="title">角色列表</div>
  177. <div class="content">
  178. <!-- <el-tree ref="columnSetTree" :data="tableCols" :class="colsCheckClass" show-checkbox node-key="index" :default-expand-all="true" :props="{
  179. label: 'role_name',
  180. children: 'role_ID',
  181. }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" /> -->
  182. <el-checkbox v-model="item.role_status" v-for="(item, index) in tableCols" :key="index" @change="handleCheckedCitiesChange(item)">{{ item.role_name }}</el-checkbox>
  183. </div>
  184. <div class="foot right t30">
  185. <!-- <el-button size="medium" class="r24" type="primary" @click="onCheck">确定</el-button> -->
  186. <el-button size="medium" @click="hide">关闭</el-button>
  187. </div>
  188. </div>
  189. </Dialog>
  190. <Dialog :flag="rmFlag">
  191. <div class="airportInfoDialog">
  192. <div class="title del-title">删除</div>
  193. <div class="content del-content">
  194. <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ rmTitle }}</span>
  195. </div>
  196. <div class="foot right Delfoot">
  197. <el-button size="small" class="r24" @click="tableRemove" type="danger">删除</el-button>
  198. <el-button size="small" @click="rmFlag = false">取消</el-button>
  199. </div>
  200. </div>
  201. </Dialog>
  202. </div>
  203. </template>
  204. <script>
  205. import pb from '@/layout/mixin/getPublicData'
  206. import Dialog from '@/layout/components/Dialog'
  207. import pf from '@/layout/mixin/publicFunc'
  208. import MD5 from 'blueimp-md5'
  209. import { listToTree } from '@/utils/validate'
  210. export default {
  211. name: 'NewManageMent',
  212. components: { Dialog },
  213. mixins: [pb, pf],
  214. data () {
  215. return {
  216. data: [
  217. {
  218. up_user_group_id: -1,
  219. user_group_comment: '',
  220. user_group_id: 0,
  221. user_group_name: '全部账号组',
  222. user_group_status: true,
  223. children: []
  224. }
  225. ],
  226. search: '',
  227. activeIndex: null,
  228. loading: false,
  229. treeCheckId: '',
  230. formInline: {
  231. user_group_name: '',
  232. user_group_comment: '',
  233. up_user_group_id: ''
  234. },
  235. rules: {
  236. user_group_name: [{ required: true, message: '请输入账号组名称', trigger: 'blur' }],
  237. },
  238. ruleForm: {
  239. "token_valid_time": null,
  240. "token_valid_duration": null,
  241. "user_code": null,
  242. "user_code_expire": null,
  243. "user_comment": null,
  244. "user_group_id": null,
  245. "user_id": null,
  246. "user_name": null,
  247. "user_pwd": null,
  248. "user_sec_pwd": null,
  249. "user_status": null,
  250. "user_token": null
  251. },
  252. tableRules: {
  253. user_name: [{ required: true, message: "请输入账号名称", trigger: "blur" }],
  254. user_group_id: [{ required: true, message: '请选择账号组', trigger: 'change' }],
  255. user_pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
  256. },
  257. paswordFlag: false,//修改密码
  258. tableFlag: false,
  259. title: '新增',
  260. type: 'add',
  261. dataType: 'add',
  262. dataTitle: '新增账号',
  263. dataObj: {},
  264. defaultProps: {
  265. children: 'children',
  266. label: 'user_group_name'
  267. },
  268. tableData: [],
  269. rmFlag: false,
  270. rmObj: {},
  271. rmTitle: '',
  272. options: [],
  273. rmType: '1',
  274. tableCols: [],
  275. dialogFlag: false,
  276. checkedKeysTemp: [],
  277. userId: '',
  278. arrs: [],
  279. authId: null,
  280. defaultArrProps: {
  281. children: 'children',
  282. label: 'user_group_name'
  283. },
  284. arrTree: [],
  285. treeCheckObj: {}
  286. }
  287. },
  288. watch: {
  289. search (val) {
  290. this.$refs.treeArr.filter(val);
  291. }
  292. },
  293. mounted () {
  294. this.getTreeData()
  295. },
  296. computed: {
  297. dataList () {
  298. return this.arrs
  299. },
  300. },
  301. methods: {
  302. async getTreeData () {
  303. const { code, returnData } = await this.getQueryListAuth(this.queryId)
  304. if (code == 0) {
  305. if (returnData && returnData.length) {
  306. this.arrTree = _.cloneDeep(returnData)
  307. const treeMenu = listToTree(returnData, 'up_user_group_id', 'user_group_id')
  308. this.arrs = treeMenu
  309. }
  310. }
  311. },
  312. filterArrNode (value, data) {
  313. if (!value) return true;
  314. return data.user_group_name.indexOf(value) !== -1;
  315. },
  316. handleAdd () {
  317. const datas = this.arrs.filter(item => item.user_group_name == '新建账号组')
  318. if (datas && datas.length) {
  319. return
  320. }
  321. this.arrs.push({ user_group_name: '新建账号组', user_group_id: 'test' })
  322. this.type = 'add'
  323. this.treeCheckId = null
  324. this.tableData = []
  325. this.clearForm()
  326. this.formInline.user_group_name = '新建账号组'
  327. // console.log(this.arrs)
  328. // this.treeCheckId = this.arrs[this.arrs.length-1].user_group_id
  329. },
  330. async handleNodeClick (data) {
  331. if (data.user_group_id) {
  332. const datas = this.arrTree.filter(item => item.user_group_id == data.up_user_group_id)
  333. this.treeCheckId = data.user_group_id
  334. this.treeCheckObj = _.cloneDeep(data)
  335. this.formInline = _.cloneDeep(data)
  336. if (data.user_group_id != 'test') {
  337. if (!data.up_user_group_id || datas.length < 1) {
  338. this.formInline.up_user_group_id = ''
  339. }
  340. this.type = 'edit'
  341. const { code, returnData } = await this.getQueryList(SERVICE_ID.getUserTableId, {
  342. up_user_group_id: data.user_group_id
  343. })
  344. if (code == 0 && returnData && returnData.length) {
  345. this.tableData = returnData
  346. } else {
  347. this.tableData = []
  348. }
  349. }
  350. }
  351. },
  352. //清空表单
  353. clearForm () {
  354. const data = this.formInline
  355. for (const key in data) {
  356. if (Object.hasOwnProperty.call(data, key)) {
  357. data[key] = null
  358. }
  359. }
  360. this.$refs['form'].resetFields()
  361. },
  362. clearTableForm () {
  363. const data = this.ruleForm
  364. for (const key in data) {
  365. if (Object.hasOwnProperty.call(data, key)) {
  366. data[key] = null
  367. }
  368. }
  369. setTimeout(() => {
  370. this.$refs['ruleForm'].resetFields()
  371. }, 50);
  372. },
  373. restPwd () {
  374. this.ruleForm.user_pwd = '123!@#QWEqwe'
  375. },
  376. //树删除
  377. handleRemove (data) {
  378. this.rmTitle = data.user_group_name
  379. this.rmFlag = true
  380. this.rmObj = data
  381. this.rmType = '1'
  382. },
  383. async tableRemove () {
  384. if (this.rmType == '1') {
  385. const { user_group_id } = this.treeCheckObj
  386. if (user_group_id == 'test') {
  387. this.arrs.pop()
  388. } else {
  389. if (this.rmObj.children) {
  390. delete this.rmObj.children
  391. }
  392. const { code } = await this.getChangeList(this.queryId, this.rmObj, 3)
  393. if (code == 0) {
  394. this.getTreeData()
  395. this.rmObj = {}
  396. this.clearForm()
  397. this.tipMsg(code)
  398. }
  399. }
  400. } else {
  401. const { user_name } = this.dataObj
  402. const { user_group_id } = this.treeCheckObj
  403. const { code } = await this.getChangeList(SERVICE_ID.getUserTableId, { user_name, up_user_group_id: user_group_id }, 3)
  404. if (code == 0) {
  405. const { returnData } = await this.getQueryList(SERVICE_ID.getUserTableId, {
  406. up_user_group_id: this.dataObj.up_user_group_id
  407. })
  408. this.tableData = returnData
  409. this.dataObj = {}
  410. this.clearTableForm()
  411. }
  412. }
  413. this.rmFlag = false
  414. },
  415. async handleSave () {
  416. this.$refs['form'].validate(async (valid) => {
  417. if (valid) {
  418. let code = null
  419. this.formInline.user_group_id = this.treeCheckId
  420. const data = _.cloneDeep(this.formInline)
  421. // console.log(this.type)
  422. if (this.type = 'edit') {
  423. const id = this.formInline.user_group_id
  424. if (id && id != 'test') {
  425. const res = await this.getChangeList(this.queryId, data, 2, 'user_group_id')
  426. code = res.code
  427. } else {
  428. let result = null
  429. if (id == 'test') {
  430. data.user_group_id = null
  431. result = await this.getChangeList(this.queryId, data, 1)
  432. } else {
  433. result = await this.getChangeList(this.queryId, data, 1)
  434. }
  435. code = result.code
  436. }
  437. }
  438. if (code == 0) {
  439. if (this.type == 'add') {
  440. this.clearForm()
  441. }
  442. this.getTreeData()
  443. }
  444. this.tipMsg(code)
  445. }
  446. else {
  447. return false
  448. }
  449. })
  450. },
  451. handleTableAdd () {
  452. if (this.treeCheckObj.user_group_id) {
  453. this.tableFlag = true
  454. this.dataType = 'add'
  455. this.dataTitle = '新增账号'
  456. this.clearTableForm()
  457. this.ruleForm.user_group_id = this.treeCheckObj.user_group_id
  458. } else {
  459. this.$message.error('请选中用户后再操作')
  460. }
  461. },
  462. handleTableEdit (row) {
  463. row.user_group_id = row.up_user_group_id
  464. this.tableFlag = true
  465. this.dataType = 'edit'
  466. this.userId = row.user_id
  467. this.dataTitle = '编辑账号'
  468. this.ruleForm = _.cloneDeep(row)
  469. },
  470. async handleTableAuth (row) {
  471. this.dialogFlag = true
  472. const result = await this.getQueryList(SERVICE_ID.roleListId)
  473. const msg = await this.getQueryList(SERVICE_ID.userAuthorizationId, {
  474. user_id: row.user_id
  475. })
  476. if (result.code == 0 && result.returnData && result.returnData.length) {
  477. this.tableCols = result.returnData
  478. this.tableCols.forEach(element => {
  479. element.user_id = row.user_id
  480. });
  481. }
  482. if (msg.code == 0 && msg.returnData && msg.returnData.length) {
  483. msg.returnData.forEach(element => {
  484. this.tableCols.forEach(res => {
  485. if (res.role_ID == element.role_id) {
  486. res.role_status = true
  487. }
  488. });
  489. });
  490. }
  491. // console.log(this.tableCols)
  492. // console.log(code)
  493. },
  494. handleTablepaswod (row) {
  495. this.paswordFlag = true
  496. this.dataType = 'edit'
  497. this.dataTitle = '修改密码'
  498. this.userId = row.user_id
  499. this.ruleForm = _.cloneDeep(row)
  500. },
  501. async handleTableDel (row) {
  502. this.dataObj = row
  503. this.rmTitle = row.user_name
  504. this.rmFlag = true
  505. this.rmType = '2'
  506. },
  507. async handleCheckedCitiesChange (data) {
  508. let arr = {}
  509. let event = null
  510. if (data.role_status == true) {
  511. event = 1
  512. arr = {
  513. role_id: data.role_ID,
  514. user_id: data.user_id
  515. }
  516. } else if (data.role_status == false) {
  517. event = 3
  518. arr = {
  519. role_id: data.role_ID,
  520. user_id: data.user_id
  521. }
  522. }
  523. const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, arr, event)
  524. this.tipMsg(code)
  525. },
  526. hide () {
  527. this.dialogFlag = false
  528. },
  529. async handleOkSk () {
  530. const id = this.ruleForm.user_group_id || this.ruleForm.user_id
  531. if (id) {
  532. const r = PLATFROM_CONFIG.editRule
  533. const b = r.test(this.ruleForm.user_pwd)
  534. if (b) {
  535. this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd)
  536. const data = _.cloneDeep(this.ruleForm)
  537. const { user_id, user_pwd } = data
  538. const newData = {
  539. user_id,
  540. user_pwd
  541. }
  542. const { code } = await this.getChangeList(SERVICE_ID.getUserTableId, newData, 2, 'user_id')
  543. this.tipMsg(code)
  544. const result = await this.getQueryList(SERVICE_ID.getUserTableId, {
  545. up_user_group_id: this.treeCheckObj.user_group_id
  546. })
  547. this.tableData = result.returnData
  548. // this.clearTableForm()
  549. this.tableFlag = false
  550. this.paswordFlag = false
  551. } else {
  552. this.$message.error('请根据密码规则设置密码')
  553. }
  554. }
  555. },
  556. async handleOk (data) {
  557. this.$refs[data].validate(async (valid) => {
  558. if (valid) {
  559. // this.ruleForm.user_pwd= MD5(this.ruleForm.user_pwd)
  560. if (this.dataType == 'add') {
  561. this.ruleForm.up_user_group_id = this.ruleForm.user_group_id
  562. delete this.ruleForm.user_group_id
  563. const data = this.ruleForm
  564. const { code } = await this.getChangeList(SERVICE_ID.getUserTableId, data, 1)
  565. this.tipMsg(code)
  566. } else {
  567. const id = this.ruleForm.user_group_id || this.ruleForm.user_id
  568. if (id) {
  569. this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd)
  570. this.ruleForm.up_user_group_id = this.ruleForm.user_group_id
  571. const data = _.cloneDeep(this.ruleForm)
  572. delete data.user_group_id
  573. delete data.user_pwd
  574. const { code } = await this.getChangeList(SERVICE_ID.getUserTableId, data, 2, 'user_id')
  575. this.tipMsg(code)
  576. }
  577. }
  578. const result = await this.getQueryList(SERVICE_ID.getUserTableId, {
  579. up_user_group_id: this.treeCheckObj.user_group_id
  580. })
  581. this.tableData = result.returnData
  582. this.clearTableForm()
  583. this.tableFlag = false
  584. this.paswordFlag = false
  585. }
  586. else {
  587. return false
  588. }
  589. })
  590. },
  591. eledite () {
  592. this.paswordFlag = false
  593. this.tableFlag = false
  594. this.clearTableForm()
  595. }
  596. }
  597. }
  598. </script>
  599. <style lang="scss" scoped>
  600. .newUserManagement {
  601. padding: 24px;
  602. height: calc(100vh - 80px);
  603. .custom-tree-node {
  604. flex: 1;
  605. font-size: 14px;
  606. padding-right: 24px;
  607. .customBtn {
  608. color: #dd3838;
  609. font-size: 12px;
  610. margin-top: 3px;
  611. }
  612. }
  613. &-content {
  614. height: 100%;
  615. .title {
  616. font-size: 20px;
  617. font-family: Microsoft YaHei;
  618. font-weight: bold;
  619. color: #101116;
  620. }
  621. &-left {
  622. height: 100%;
  623. width: 440px;
  624. background: #ffffff;
  625. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
  626. border-radius: 4px;
  627. margin-right: 16px;
  628. .newService-content-left-top {
  629. padding: 24px 24px 18px 24px;
  630. .search {
  631. margin-top: 18px;
  632. }
  633. }
  634. .newService-content-left-bottom {
  635. height: calc(100% - 130px);
  636. padding-right: 5px;
  637. }
  638. .contents {
  639. // margin-top: 24px;
  640. padding: 0 24px;
  641. height: 42px;
  642. line-height: 42px;
  643. .left {
  644. font-size: 16px;
  645. font-family: Microsoft YaHei;
  646. font-weight: bold;
  647. color: #101116;
  648. }
  649. .right {
  650. color: #dd3838;
  651. cursor: pointer;
  652. }
  653. .custom-tree-node {
  654. flex: 1;
  655. display: flex;
  656. align-items: center;
  657. justify-content: space-between;
  658. font-size: 14px;
  659. padding-right: 8px;
  660. .customBtn {
  661. color: #dd3838;
  662. font-size: 12px;
  663. }
  664. }
  665. }
  666. .active {
  667. background: #e4f3f9;
  668. }
  669. }
  670. &-right {
  671. &-top {
  672. height: 136px;
  673. background: #ffffff;
  674. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
  675. border-radius: 4px;
  676. padding: 24px;
  677. .contents {
  678. .el-form-item {
  679. margin-bottom: 0;
  680. margin-top: 20px;
  681. }
  682. }
  683. }
  684. &-bottom {
  685. margin-top: 16px;
  686. height: calc(100% - 152px);
  687. background: #ffffff;
  688. box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
  689. border-radius: 4px;
  690. padding: 24px;
  691. .contents {
  692. margin-top: 24px;
  693. height: calc(100% - 50px);
  694. }
  695. }
  696. }
  697. }
  698. }
  699. </style>