staffEdit.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. <!--
  2. * @Author: your name
  3. * @Date: 2022-02-10 14:49:20
  4. * @LastEditTime: 2022-03-16 15:13:46
  5. * @LastEditors: your name
  6. * @Description: 编辑职员
  7. * @FilePath: \Foshan4A4.0\src\views\staffManagement\compontents\staffEdit.vue
  8. -->
  9. <template>
  10. <div class="authorityPower">
  11. <!--编辑职员-->
  12. <div class="addApp-form">
  13. <div class="addApp-form-title flex">
  14. <div class="title">编辑职员</div>
  15. <div v-is="['officer_btn_edit']" class="btn">
  16. <el-button @click="saveBtn('form')" type="primary">保存</el-button>
  17. </div>
  18. </div>
  19. <div class="addApp-form-content dialog-public-background">
  20. <el-form :inline="true" ref="form" :rules="rules" class="form" :model="form">
  21. <el-form-item prop="name" label="职员名称">
  22. <el-input placeholder="请输入职员名称" v-model.trim="form.name"></el-input>
  23. </el-form-item>
  24. <el-form-item prop="loginName" label="职员登录名">
  25. <el-input placeholder="请输入职员登录名" v-model.trim="form.loginName"></el-input>
  26. </el-form-item>
  27. <el-form-item prop="phone" label="职员手机号">
  28. <el-input placeholder="请输入职员手机号" v-model.trim="form.phone"></el-input>
  29. </el-form-item>
  30. <el-form-item prop="loginPwd" style="margin-right: 16px" label="登录密码">
  31. <el-input placeholder="*******" disabled v-model="form.loginPwd"></el-input>
  32. </el-form-item>
  33. <el-form-item v-is="['officer_btn_resetpwd']">
  34. <el-button size="small" type="primary" @click="reSetPassWord">重置密码</el-button>
  35. </el-form-item>
  36. <el-form-item prop="desc" label="描述">
  37. <el-input class="lastInput" placeholder="请输入描述" v-model.trim="form.desc"></el-input>
  38. </el-form-item>
  39. </el-form>
  40. </div>
  41. </div>
  42. <div class="power-content flex-wrap">
  43. <div class="r24 flex1 part">
  44. <Organization ref="Organization" :defaultProps="defaultProps" :vice="true" :data="data" @getTreeData="getOrgan" @radioChange="radioChange" :checkedKeys="orgCheckedKeys" :checkedKeysDuo="checkedKeysDuo" @getTreeDataDuo="getTreeDataDuo" :orgList="orgList" nodekey="OrganId" title="选择组织" />
  45. </div>
  46. <!--开启多对多-->
  47. <template v-if="OpenAuthData">
  48. <div class="flex1 part">
  49. <Rolelist @checkChange="accountChange" :checkBoxList="checkBoxList" :roleType="roleType" :active="true" class="hucRole" :number="4" title="账号列表" />
  50. </div>
  51. </template>
  52. <!--未开启多对多-->
  53. <template v-else>
  54. <!--有岗位 无角色-->
  55. <template v-if="OpenGroup && !openRole">
  56. <div class="r24 flex1 part">
  57. <Usergroup @getTreeData="getUserGroup" :checkedKeys="userGroupKeys" :title="`${accountGroupType}树`" />
  58. </div>
  59. <div class="r24 flex1 part">
  60. <Permissiontree ref="Permissiontree" :queryType="queryType" :queryId="treeId" :checkedKeys="checkedBoxs" :isMainJob="isMainJob" @nodeClick="nodeClick" @getTreeData="getTreeData" title="权限树" />
  61. </div>
  62. <div class="flex1 part">
  63. <Rulesofcompetency style="height: 512px" class="hucPower" :authList="authList" :authTo="authTo" @getData="getData" title="权限规则" />
  64. <Loginpolicy style="margin-top: 24px; height: calc(100% - 24px - 512px)" :imageSize="20" :checkedList="checkedList" @getCheckedList="getCheckedList" title="登录策略" />
  65. </div>
  66. </template>
  67. <!--有角色 无岗位-->
  68. <template v-if="openRole && !OpenGroup">
  69. <div class="r24 flex1 part">
  70. <Rolelist @checkChange="checkChange" :imageSize="120" @checkClick="checkClick" :roleType="roleType" :checkBoxList="roleCheckBoxs" :active="true" class="hucRole" :number="8" title="角色列表" />
  71. </div>
  72. <div class="flex1 part">
  73. <Permissionlist style="height: 376px" :imageSize="120" :RoleList="RoleList" :check="true" class="hucPower" title="权限列表" />
  74. <Loginpolicy style="margin-top: 24px; height: calc(100% - 24px - 376px)" :imageSize="120" :checkedList="checkedList" @getCheckedList="getCheckedList" title="登录策略" />
  75. </div>
  76. </template>
  77. <!--有角色 有岗位-->
  78. <template v-if="openRole && OpenGroup">
  79. <div class="r24 flex1 part">
  80. <Usergroup @getTreeData="getUserGroup" :checkedKeys="userGroupKeys" :title="`${accountGroupType}树`" />
  81. </div>
  82. <div class="r24 flex1 part">
  83. <Rolelist @checkChange="checkChange" :imageSize="120" @checkClick="checkClick" :GroupIds="GroupIds" :roleType="roleType" :checkBoxList="roleCheckBoxs" @role-list-change="roleChange" :active="true" class="hucRole" :number="8" title="角色列表" />
  84. </div>
  85. <div class="flex1 part">
  86. <Permissionlist style="height: 376px" :imageSize="120" :RoleList="RoleList" :check="true" class="hucPower" title="权限列表" />
  87. <Loginpolicy style="margin-top: 24px; height: calc(100% - 24px - 376px)" :imageSize="120" :checkedList="checkedList" @getCheckedList="getCheckedList" title="登录策略" />
  88. </div>
  89. </template>
  90. <!--无岗位 无角色-->
  91. <template v-if="!OpenGroup && !openRole">
  92. <div class="r24 flex1 part">
  93. <Permissiontree ref="Permissiontree" :queryType="queryType" :queryId="treeId" :checkedKeys="checkedBoxs" :isMainJob="isMainJob" @nodeClick="nodeClick" @getTreeData="getTreeData" title="权限树" />
  94. </div>
  95. <div class="flex1 part">
  96. <Rulesofcompetency style="height: 512px" class="hucPower" :authList="authList" :authTo="authTo" @getData="getData" title="权限规则" />
  97. <Loginpolicy style="margin-top: 24px; height: calc(100% - 24px - 512px)" :imageSize="20" :checkedList="checkedList" @getCheckedList="getCheckedList" title="登录策略" />
  98. </div>
  99. </template>
  100. </template>
  101. </div>
  102. </div>
  103. </template>
  104. <script>
  105. import Permissiontree from "@/components/permissiontree";
  106. import Rulesofcompetency from "@/components/rulesofcompetency";
  107. import Organization from "@/components/organization";
  108. import Permissionlist from "@/components/permissionlist";
  109. import Rolelist from "@/components/rolelist";
  110. import Loginpolicy from "@/components/loginpolicy";
  111. import Usergroup from "@/components/msgTree";
  112. import treeData from "../minixs/treeData";
  113. import { mapGetters } from "vuex";
  114. import { RoleAuths } from "@/api/apiAuthority";
  115. import {
  116. newstaffmod,
  117. postList,
  118. organgitpost,
  119. jbdetpop,
  120. Staffdetails,
  121. } from "@/api/postInterface";
  122. import { pwdProduce } from "@/utils/validate";
  123. import { lengthValidator, regular } from '@/utils/validate';
  124. export default {
  125. name: "AuthorityPower",
  126. mixins: [treeData],
  127. components: {
  128. Rulesofcompetency,
  129. Organization,
  130. Permissiontree,
  131. Permissionlist,
  132. Rolelist,
  133. Loginpolicy,
  134. Usergroup
  135. },
  136. data () {
  137. return {
  138. Status: null,
  139. AppId: null,
  140. form: {
  141. //应用表单
  142. name: "",
  143. loginName: "",
  144. loginPwd: "",
  145. desc: "",
  146. phone: ""
  147. },
  148. title: "角色",
  149. rules: {
  150. //表单验证
  151. name: [
  152. { required: true, message: "请输入职员名称", trigger: "blur" },
  153. { validator: lengthValidator, max: 32, message: '长度在 1 到 32 个字符', trigger: ['change', 'blur'] }
  154. ],
  155. loginName: [
  156. { required: true, message: "请输入职员登录名", trigger: "blur" },
  157. { pattern: regular.name, message: regular.nameMessage, trigger: ['change', 'blur'] },
  158. { validator: lengthValidator, max: 32, message: '长度在 1 到 32 个字符', trigger: ['change', 'blur'] },
  159. ],
  160. phone: [
  161. { pattern: regular.integer, message: '请输入纯数字', trigger: ['blur', 'change'] },
  162. { validator: lengthValidator, min: 11, max: 11, message: '请输入11位电话号码', trigger: ['change', 'blur'] }
  163. ],
  164. desc: [
  165. { validator: lengthValidator, max: 128, message: '长度在 1 到 128 个字符', trigger: ['change', 'blur'] },
  166. ],
  167. },
  168. defaultProps: {
  169. children: "children",
  170. label: "OrganName",
  171. },
  172. treeId: null, //根据组织获取权限树的组织ID
  173. checkedKeys: [], //上级组织选中
  174. RoleList: [],
  175. checkedBoxs: [],
  176. checkedKeysDuo: [],
  177. arrs: [],
  178. authArrs: [],//
  179. OfficerId: null,
  180. authId: [], //权限树默认选中ID
  181. authList: [],
  182. authTo: {},
  183. orgTypes: [],
  184. checkBoxList: [], //副岗默认选中
  185. checkedList: [], //登录策略默认选中的数据
  186. radioCheck: null, //主岗默认选中
  187. radioNum: null, //主岗已选中
  188. roleDatas: [], //接口详情返回的角色列表数据
  189. roleCheckBoxs: [], //角色列表默认选中数据
  190. groupCheckBoxs: [], //权限组列表默认选中数据
  191. orgCheckedKeys: [], //组织树默认选中
  192. loginCheckBoxs: [], //登录策略数据
  193. mainData: [], //主岗数据
  194. JobId: "", //选中主岗ID
  195. DepJobIds: [],//选中副岗ID集合
  196. lessData: [], //副岗数据
  197. lessCheckBoxs: [], //副岗选中数据联合主岗
  198. lessChecksData: [], //副岗选中数据
  199. queryType: null, //权限树类型
  200. openRole: null,
  201. OpenGroup: null,
  202. OpenAuthData: null,
  203. roleType: '',
  204. dataObj: {}, //上级权限指定树数据
  205. data: [], //上级权限
  206. roleList: [], //角色
  207. checkRoles: [], //选中的角色
  208. checkTrees: [], //上级权限选中树数据
  209. rulesObj: {}, //权限规则数据
  210. isMainJob: true, //是否主岗
  211. oldOrganId: "",
  212. onCheckedArr: [],//当前显示选中权限组
  213. alljobArr: [],//全部岗位
  214. GroupIds: [], //当前选中的用户组
  215. userGroupKeys: [], //当前回调选中的用户组
  216. orgList: [],
  217. setStatus: []
  218. };
  219. },
  220. computed: {
  221. ...mapGetters(["systemSet"]),
  222. },
  223. watch: {
  224. //监听上级组织数据
  225. dataList: {
  226. handler (val) {
  227. const arr = [val];
  228. this.decompose(arr);
  229. this.data = arr;
  230. },
  231. deep: true,
  232. },
  233. mainData: {
  234. handler (arr) {
  235. if (this.radioCheck) {
  236. let ids = null;
  237. arr.forEach((item, index) => {
  238. if (item.JobId == this.radioCheck) {
  239. ids = index;
  240. }
  241. })
  242. this.radioNum = ids;
  243. }
  244. },
  245. deep: true,
  246. }
  247. },
  248. created () {
  249. const { OrganId, OfficerId } = this.$route.query;
  250. const { OpenRole, PwdLengthBegin, PwdLengthEnd, PwdStruc, OpenGroup, UserOfficerMulti } =
  251. typeof this.systemSet === "string"
  252. ? JSON.parse(this.systemSet)
  253. : this.systemSet; //1是请求角色 0是请求用户
  254. // this.form.loginPwd = pwdProduce(PwdLengthBegin, PwdLengthEnd, PwdStruc);
  255. this.OfficerId = OfficerId;
  256. this.openRole = OpenRole;
  257. this.OpenGroup = OpenGroup;
  258. this.OpenAuthData = UserOfficerMulti;
  259. if (OpenGroup || !OpenGroup && !OpenRole) {
  260. this.queryType = "all";
  261. }
  262. this.getOfficerDetails(OfficerId);
  263. },
  264. methods: {
  265. //职员详情查询
  266. async getOfficerDetails (id) {
  267. try {
  268. let params = {
  269. OfficerId: id,
  270. };
  271. const res = await Staffdetails(params);
  272. if (res.code === 0) {
  273. const obj = res.returnData;
  274. const {
  275. AuthList,
  276. DepJobList,
  277. JobId,
  278. OrganId,
  279. OfficerDesc,
  280. OfficerLoginName,
  281. OfficerName,
  282. Phone,
  283. RoleList,
  284. TacList,
  285. GroupList,
  286. UserList,
  287. Status
  288. } = obj;
  289. this.form.name = OfficerName;
  290. this.form.loginName = OfficerLoginName;
  291. this.form.desc = OfficerDesc;
  292. this.form.phone = Phone;
  293. this.orgCheckedKeys = [OrganId];
  294. this.oldOrganId = OrganId;
  295. this.roleDatas = RoleList;
  296. this.radioCheck = JobId;
  297. this.JobId = JobId;
  298. this.isMainJob = false;
  299. this.AppId = OrganId;
  300. this.Status = Status;
  301. this.getJobListByOrgan(OrganId);
  302. if (this.OpenAuthData) {
  303. this.roleType = 'account';
  304. }
  305. if (this.openRole && !this.OpenGroup && !this.OpenAuthData) {
  306. this.roleType = 'onlyRole';
  307. }
  308. if (AuthList && AuthList.length) {
  309. AuthList.forEach((item) => {
  310. this.authId.push(item.AuthId);
  311. });
  312. this.authList = _.cloneDeep(AuthList);
  313. this.authTo = AuthList[0];
  314. this.checkedBoxs = this.authId;
  315. }
  316. if (RoleList && RoleList.length) {
  317. this.roleCheckBoxs = RoleList;
  318. this.checkRoles = RoleList;
  319. if (this.openRole && this.OpenGroup && !this.OpenAuthData) {
  320. this.roleType = 'onlyRole';
  321. }
  322. }
  323. if (GroupList && GroupList.length) {
  324. const datas = [];
  325. GroupList.forEach(item => {
  326. datas.push(item.GroupId);
  327. })
  328. this.userGroupKeys = datas;
  329. this.GroupIds = datas;
  330. }
  331. if (UserList && UserList.length) {
  332. const datas = [];
  333. UserList.forEach(item => {
  334. datas.push(item.UserId);
  335. })
  336. this.checkBoxList = datas;
  337. }
  338. if (DepJobList && DepJobList.length) {
  339. const datas = [];
  340. DepJobList.forEach(item => {
  341. datas.push(item.JobId);
  342. })
  343. this.checkedKeysDuo = datas;
  344. this.lessData = DepJobList;
  345. }
  346. this.checkedList = TacList;
  347. this.loginCheckBoxs = TacList;
  348. } else {
  349. this.$message.error(res.message);
  350. }
  351. } catch (error) {
  352. console.log("出错了", error);
  353. }
  354. },
  355. //获取选中的树数据
  356. getTreeData (arr) {
  357. this.checkTrees = arr;
  358. },
  359. roleChange (arr) {
  360. const datas = [];
  361. arr.forEach(item => {
  362. this.roleCheckBoxs.forEach((p) => {
  363. if (item.RoleId == p.RoleId) {
  364. datas.push(p)
  365. }
  366. })
  367. })
  368. this.roleCheckBoxs = datas;
  369. },
  370. // 默认选中
  371. defaultChecked (arr, id) {
  372. const datas = []
  373. this.onCheckedArr = [];
  374. arr.forEach((item, index) => {
  375. this.checkRoles.forEach(p => {
  376. if (item[id] == p[id]) {
  377. datas.push(index)
  378. this.onCheckedArr.push(item);
  379. }
  380. })
  381. })
  382. if (this.openRole) {
  383. this.roleCheckBoxs = datas;
  384. } else if (this.OpenGroup) {
  385. this.groupCheckBoxs = datas;
  386. }
  387. },
  388. //获取组织选中的数据
  389. getOrgan (arr) {
  390. const { OrganId } = arr[0];
  391. this.AppId = OrganId;
  392. this.getJobListByOrgan(OrganId);
  393. },
  394. //获取组织选中的数据-多选
  395. getTreeDataDuo (arr) {
  396. this.lessData = arr;
  397. },
  398. //获取指定数据
  399. decompose (data, id) {
  400. for (let i = 0; i < data.length; i++) {
  401. data[i]['status'] == 1 ? '' : data[i]['disabled'] = true;
  402. if (data[i].children && data[i].children.length > 0) {
  403. this.decompose(data[i].children, id);
  404. }
  405. }
  406. },
  407. //权限树点击
  408. nodeClick (obj) {
  409. const arr = this.$store.getters.authArrs;
  410. arr.push(obj);
  411. this.$store.dispatch("auth/changeAuthArrs", arr);
  412. },
  413. //根据主岗查询角色
  414. radioChange (val) {
  415. const { JobId } = this.mainData[val];
  416. this.JobId = JobId;
  417. this.radioCheck = null;
  418. },
  419. //根据岗位获取角色
  420. async getRoleByJob (id, index) {
  421. try {
  422. let params = {
  423. JobId: id,
  424. };
  425. const res = await jbdetpop(params);
  426. if (res.code === 0) {
  427. const datas = res.returnData;
  428. const arrs = [];
  429. datas.forEach((item) => {
  430. item.name = item.RoleName;
  431. if (item.IsSelected == 1) {
  432. arrs.push(item);
  433. }
  434. });
  435. if (index == 1) {
  436. this.arrs = arrs;
  437. this.lessCheckBoxs.push(arrs);
  438. } else if (index == 2) {
  439. if (arrs.length) {
  440. this.lessCheckBoxs.push(arrs);
  441. const msgs = this.lessCheckBoxs.flat();
  442. const uninqMsgs = _.unionBy(msgs, "RoleId");
  443. this.arrs = uninqMsgs;
  444. }
  445. }
  446. } else {
  447. this.$message.error(res.message);
  448. }
  449. } catch (error) {
  450. console.log("出错了", error);
  451. }
  452. },
  453. //根据组织查询岗位列表-主岗
  454. async getJobListByOrgan (id) {
  455. try {
  456. let params = {
  457. OrganId: id,
  458. };
  459. const res = await organgitpost(params);
  460. if (res.code === 0) {
  461. const datas = res.returnData;
  462. datas.forEach((item) => {
  463. item.name = item.JobName;
  464. });
  465. this.mainData = datas;
  466. } else {
  467. this.$message.error(res.message);
  468. }
  469. } catch (error) {
  470. console.log("出错了", error);
  471. }
  472. },
  473. //角色点击回调
  474. checkClick (item) {
  475. this.roleAuths(item.RoleId);
  476. },
  477. //用户组选中回调
  478. getUserGroup (arr) {
  479. const datas = [];
  480. arr.forEach(item => {
  481. datas.push(item.GroupId);
  482. })
  483. this.GroupIds = datas;
  484. },
  485. //岗位点击回调
  486. checkGroup (item) {
  487. this.groupAuths(item.GroupId)
  488. },
  489. //根据角色查看权限列表
  490. async roleAuths (id) {
  491. try {
  492. let params = {
  493. RoleId: id
  494. };
  495. const res = await RoleAuths(params);
  496. if (res.code === 0) {
  497. this.RoleList = res.returnData;
  498. } else {
  499. this.$message.error(res.message);
  500. }
  501. } catch (error) {
  502. console.log("出错了", error);
  503. }
  504. },
  505. //账号列表选取
  506. accountChange (arr) {
  507. this.checkBoxList = arr;
  508. },
  509. //角色选取
  510. checkChange (arr) {
  511. this.checkRoles = arr;
  512. this.onCheckedArr = arr;
  513. },
  514. //获取权限规则
  515. getData (obj) {
  516. this.rulesObj = obj;
  517. },
  518. //获取登录策略回调
  519. getCheckedList (arr) {
  520. this.loginCheckBoxs = arr;
  521. },
  522. //保存
  523. saveBtn (formName) {
  524. this.$refs[formName].validate((valid) => {
  525. if (valid) {
  526. this.saveOrgan();
  527. } else {
  528. console.log("error submit!!");
  529. return false;
  530. }
  531. });
  532. },
  533. //组织新增保存
  534. async saveOrgan () {
  535. try {
  536. // console.log(this.AppId)
  537. // if (this.JobId) {
  538. // if (!this.AppId) {
  539. // this.$message.error("请选中一个组织后再新增");
  540. // return false;
  541. // }
  542. // } else {
  543. // this.AppId = this.oldOrganId
  544. // }
  545. // console.log(this.AppId)
  546. // return
  547. const datas = [];
  548. const checks = [];
  549. const GroupIds = [];
  550. const arrs = [];
  551. if (this.checkTrees.length) {
  552. this.checkTrees.forEach((item) => {
  553. datas.push(item.AuthList);
  554. });
  555. }
  556. if (this.GroupIds.length) {
  557. this.GroupIds.forEach(item => {
  558. const obj = {
  559. GroupId: item
  560. }
  561. GroupIds.push(obj);
  562. });
  563. }
  564. if (this.checkRoles.length) {
  565. this.checkRoles.forEach(item => {
  566. item.IsSelected = 1;
  567. checks.push(item);
  568. });
  569. }
  570. if (this.lessData.length) {
  571. this.lessData.forEach(item => {
  572. const obj = {
  573. JobId: item.OrganId || item.organId || item.JobId
  574. }
  575. arrs.push(obj);
  576. });
  577. }
  578. const res = await newstaffmod({
  579. OfficerName: this.form.name,
  580. OfficerDesc: this.form.desc,
  581. OfficerLoginName: this.form.loginName,
  582. OfficerPwd: this.form.loginPwd,
  583. Phone: this.form.phone,
  584. RoleList: checks.length ? checks : [],
  585. AuthList: this.openRole ? [] : datas,
  586. TacList: this.loginCheckBoxs,
  587. GroupList: GroupIds.length ? GroupIds : [],
  588. JobId: this.JobId,
  589. Status: Number(this.Status),
  590. DepJobList: arrs.length ? arrs : [],
  591. OrganId: this.AppId,
  592. OfficerId: this.OfficerId,
  593. UserList: this.OpenAuthData ? this.checkBoxList : []
  594. });
  595. if (res.code === 0) {
  596. this.$message.success(res.message);
  597. this.$store.dispatch("tagsView/delView", this.$route);
  598. this.$router.push("/staff");
  599. } else {
  600. this.$message.error(res.message);
  601. }
  602. } catch (error) {
  603. console.log("出错了", error);
  604. }
  605. },
  606. reSetPassWord () {
  607. const { PwdLengthBegin, PwdLengthEnd, PwdStruc } =
  608. typeof this.systemSet === "string"
  609. ? JSON.parse(this.systemSet)
  610. : this.systemSet; //1是请求角色 0是请求用户
  611. this.form.loginPwd = pwdProduce(PwdLengthBegin, PwdLengthEnd, PwdStruc);
  612. },
  613. }
  614. }
  615. </script>
  616. <style lang="scss" scoped>
  617. .authorityPower {
  618. padding: 0 64px;
  619. padding-top: 32px;
  620. }
  621. .addApp-form {
  622. background: #ffffff;
  623. box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  624. border-radius: 16px;
  625. padding: 32px 32px 40px 32px;
  626. .title {
  627. font-size: 24px;
  628. font-family: Microsoft YaHei;
  629. font-weight: bold;
  630. color: #303133;
  631. .isqy {
  632. span {
  633. font-weight: 400;
  634. font-size: 14px;
  635. margin: 0 28px 0 42px;
  636. }
  637. }
  638. }
  639. .addApp-form-content {
  640. margin-top: 40px;
  641. ::v-deep .form {
  642. .el-form-item {
  643. margin-bottom: 0;
  644. margin-right: 30px;
  645. &:last-child {
  646. margin-right: 0;
  647. }
  648. }
  649. .el-input__inner {
  650. height: 32px;
  651. line-height: 32px;
  652. width: 150px;
  653. }
  654. .content {
  655. .el-form-item__content {
  656. flex: 1;
  657. }
  658. .el-form-item__label {
  659. margin-left: 27px;
  660. }
  661. }
  662. .lastInput {
  663. width: 27vw;
  664. .el-input__inner {
  665. width: 100%;
  666. }
  667. }
  668. }
  669. }
  670. }
  671. .power-content {
  672. margin-top: 24px;
  673. min-height: 68vh;
  674. .part {
  675. height: 750px;
  676. // ::v-deep .paren_content {
  677. // height: 85%;
  678. // .cont > .paren_content {
  679. // height: 100% !important;
  680. // }
  681. // }
  682. }
  683. }
  684. </style>