addEdit.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. <template>
  2. <el-dialog
  3. v-loading="loading"
  4. :title="title"
  5. :center="true"
  6. align="left"
  7. top="5vh"
  8. width="1040px"
  9. :close-on-click-modal="false"
  10. :visible.sync="showModelThis"
  11. element-loading-text="拼命加载中"
  12. element-loading-spinner="el-icon-loading"
  13. element-loading-background="rgba(0, 0, 0, 0.8)"
  14. @close="showModelThis = false"
  15. >
  16. <el-card style="margin-top: -20px">
  17. <el-row :gutter="10">
  18. <el-form
  19. ref="ruleForm"
  20. :model="ruleForm"
  21. status-icon
  22. :size="'mini'"
  23. :rules="rulesThis"
  24. label-width="80px"
  25. class="demo-ruleForm"
  26. >
  27. <el-col :span="8">
  28. <el-form-item label="角色名称" prop="role_name">
  29. <el-input
  30. v-model="ruleForm.role_name"
  31. :disabled="isDetail"
  32. maxlength="50"
  33. placeholder="角色名称"
  34. />
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="8">
  38. <el-form-item
  39. label="是否允许查看价格"
  40. prop="is_allow_see_price"
  41. label-width="140px"
  42. >
  43. <el-select
  44. v-model="ruleForm.is_allow_see_price"
  45. :disabled="isDetail"
  46. placeholder="是否允许查看价格"
  47. >
  48. <el-option :label="'允许'" :value="1" />
  49. <el-option :label="'不允许'" :value="0" />
  50. </el-select>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="8">
  54. <el-form-item label="角色等级" prop="level">
  55. <el-select
  56. v-model="ruleForm.level"
  57. filterable
  58. :disabled="isDetail"
  59. placeholder="请选择角色等级"
  60. style="width: 100%"
  61. >
  62. <el-option
  63. v-for="item in roleLevel"
  64. :key="'ruleid' + item.code"
  65. :label="item.name"
  66. :value="item.code"
  67. />
  68. </el-select>
  69. </el-form-item>
  70. </el-col>
  71. <div class="quanxian-main">
  72. <div class="quanxian-title">
  73. <span style="color: #ff8888">*</span
  74. ><span
  75. style="
  76. font-size: 14px;
  77. color: #606266;
  78. line-height: 40px;
  79. padding: 0 12px 0 0;
  80. font-weight: 700;
  81. "
  82. >功能权限</span
  83. >
  84. </div>
  85. <div class="rule-view">
  86. <div class="rule-list">
  87. <el-row
  88. v-for="(item, index) in actionList"
  89. :key="'menu' + item.id + index"
  90. >
  91. <el-col
  92. v-if="item.child && item.child.length > 0"
  93. class="ffff"
  94. :span="24"
  95. >
  96. <div class="ftitle">
  97. <span>{{ item.menu_name }}</span>
  98. </div>
  99. <div class="fbody">
  100. <div
  101. class="fbody-item"
  102. v-for="(subItem, subIndex) in item.child"
  103. :key="'yemian' + subItem.id + subIndex"
  104. >
  105. <template
  106. v-if="
  107. !(
  108. subItem.action &&
  109. subItem.action.length === 0 &&
  110. subItem.action_data &&
  111. subItem.action_data.length === 0
  112. )
  113. "
  114. >
  115. <div class="stitle">
  116. <span class="_h2">{{ subItem.menu_name }}</span>
  117. <el-radio-group
  118. style="margin: 0 0 0 20px"
  119. size="mini"
  120. :disabled="isDetail"
  121. v-if="
  122. subItem &&
  123. subItem.private &&
  124. subItem.private.length === 2
  125. "
  126. v-model="subItem.is_private_change"
  127. >
  128. <el-radio-button
  129. :disabled="isDetail"
  130. v-for="(radioN, ri) in subItem.private"
  131. :key="radioN.label + ri"
  132. :label="radioN.id"
  133. >{{ radioN.label }}</el-radio-button
  134. >
  135. </el-radio-group>
  136. </div>
  137. <div
  138. class="scheck"
  139. v-if="subItem.action && subItem.action.length > 0"
  140. >
  141. <div class="checkAll">
  142. <el-checkbox
  143. v-model="subItem.checkAll"
  144. :disabled="isDetail"
  145. :indeterminate="indeterminateCheck(subItem)"
  146. @change="
  147. handleCheckAllChange(
  148. $event,
  149. index,
  150. item,
  151. subIndex
  152. )
  153. "
  154. >功能全选</el-checkbox
  155. >
  156. </div>
  157. <div class="checkItem">
  158. <el-checkbox-group
  159. v-model="subItem.checkList"
  160. :disabled="isDetail"
  161. @change="
  162. handleCheckedGroupChange(
  163. $event,
  164. index,
  165. item,
  166. subIndex
  167. )
  168. "
  169. >
  170. <template v-for="children in subItem.action">
  171. <el-checkbox
  172. :disabled="isDetail"
  173. :key="'checkItem' + children.id"
  174. :label="children.id"
  175. @change="
  176. handleCheckedChange(
  177. $event,
  178. children.id,
  179. index,
  180. subIndex,
  181. item
  182. )
  183. "
  184. >{{ children.action_name }}</el-checkbox
  185. >
  186. </template>
  187. </el-checkbox-group>
  188. </div>
  189. </div>
  190. <div
  191. class="sfield"
  192. v-if="
  193. subItem.action_data &&
  194. subItem.action_data.length > 0
  195. "
  196. >
  197. <div class="checkAll">
  198. <el-checkbox
  199. v-model="subItem.fieldAll"
  200. :disabled="isDetail"
  201. :indeterminate="indeterminateField(subItem)"
  202. @change="
  203. handleFieldAllChange(
  204. $event,
  205. index,
  206. item,
  207. subIndex
  208. )
  209. "
  210. >字段全选</el-checkbox
  211. >
  212. </div>
  213. <div class="checkItem">
  214. <el-checkbox-group
  215. v-model="subItem.fieldList"
  216. :disabled="isDetail"
  217. @change="
  218. handleFieldGroupChange(
  219. $event,
  220. index,
  221. item,
  222. subIndex
  223. )
  224. "
  225. >
  226. <template
  227. v-for="children in subItem.action_data"
  228. >
  229. <el-checkbox
  230. :key="'FieldItem' + children.id"
  231. :label="children.id"
  232. :disabled="isDetail"
  233. @change="
  234. handleFieldChange(
  235. $event,
  236. children.id,
  237. index,
  238. subIndex,
  239. item
  240. )
  241. "
  242. >{{ children.field_name }}</el-checkbox
  243. >
  244. </template>
  245. </el-checkbox-group>
  246. </div>
  247. </div>
  248. </template>
  249. </div>
  250. </div>
  251. </el-col>
  252. </el-row>
  253. </div>
  254. </div>
  255. </div>
  256. </el-form>
  257. <el-col :span="24" style="text-align: right">
  258. <el-button
  259. v-if="!isDetail"
  260. type="primary"
  261. :size="'mini'"
  262. @click="submitForm"
  263. >保 存
  264. </el-button>
  265. <el-button @click="showModelThis = false" :size="'mini'">{{
  266. isDetail ? "关 闭" : "取 消"
  267. }}</el-button>
  268. </el-col>
  269. </el-row>
  270. </el-card>
  271. </el-dialog>
  272. </template>
  273. <script>
  274. import asyncRequest from "@/apis/service/interest/role";
  275. import roleLevel from "@/assets/js/roleLevel";
  276. import { isChinese, isEmoticon } from "@/utils/validate";
  277. import resToken from "@/mixins/resToken";
  278. import { mapState } from "vuex";
  279. export default {
  280. name: "Role",
  281. props: ["showModel", "id", "isDetail"],
  282. mixins: [resToken],
  283. data() {
  284. const validatename = (rule, value, callback) => {
  285. if (value === "") {
  286. callback(new Error("角色名称不能为空!"));
  287. } else {
  288. if (value.lenght < 2 || value.lenght > 10) {
  289. callback(new Error("角色名称规则为2~10位汉字!"));
  290. } else if (!isChinese(value)) {
  291. callback(new Error("角色名称规则为2~10位汉字!"));
  292. } else if (isEmoticon(value)) {
  293. callback(new Error("角色名称规则为2~10位汉字!"));
  294. } else {
  295. callback();
  296. }
  297. }
  298. };
  299. return {
  300. loading: false,
  301. title: "添加角色",
  302. private_data: [], //私有数据菜单ID
  303. showModelThis: this.showModel,
  304. roleLevel: roleLevel,
  305. ruleForm: {
  306. role_name: "",
  307. level: "1",
  308. private_field: [],
  309. },
  310. action_data: [], // 字段数据
  311. action: [], // 功能数据
  312. // 当前角色
  313. roleActive: {
  314. rules: [],
  315. },
  316. // 角色列表
  317. roleList: [],
  318. // 功能权限列表
  319. ruleList: [],
  320. dataList: [],
  321. actionList: [],
  322. rulesThis: this.rules,
  323. rules: {
  324. is_allow_see_price: [
  325. {
  326. required: true,
  327. message: "选择是否允许查看价格",
  328. trigger: "change",
  329. },
  330. ],
  331. role_name: [
  332. {
  333. required: true,
  334. validator: validatename,
  335. trigger: "blur",
  336. },
  337. ],
  338. level: [
  339. { required: true, message: "请选择角色等级", trigger: "change" },
  340. ],
  341. },
  342. };
  343. },
  344. computed: {
  345. ...mapState({
  346. currentCompany: (state) => state.user.currentCompany
  347. }),
  348. indeterminateCheck() {
  349. return (item) => {
  350. // 选中子节点的数量
  351. const selectItemLength = item.action.filter(
  352. (filitem) =>
  353. item.checkList.findIndex((finditem) => finditem === filitem.id) > -1
  354. ).length;
  355. // 未选中子节点的数量
  356. const noSlectItemLength = item.action.filter(
  357. (filitem) =>
  358. item.checkList.findIndex((finditem) => finditem === filitem.id) ==
  359. -1
  360. ).length;
  361. // // 当前节点的index
  362. // 存在选中子节点且存在未选中子节点为中间态
  363. return selectItemLength > 0 && noSlectItemLength > 0;
  364. };
  365. },
  366. indeterminateField() {
  367. return (item) => {
  368. // 选中子节点的数量
  369. const selectItemLength = item.action_data.filter(
  370. (filitem) =>
  371. item.fieldList.findIndex((finditem) => finditem === filitem.id) > -1
  372. ).length;
  373. // 未选中子节点的数量
  374. const noSlectItemLength = item.action_data.filter(
  375. (filitem) =>
  376. item.fieldList.findIndex((finditem) => finditem === filitem.id) ==
  377. -1
  378. ).length;
  379. // // 当前节点的index
  380. // 存在选中子节点且存在未选中子节点为中间态
  381. return selectItemLength > 0 && noSlectItemLength > 0;
  382. };
  383. },
  384. },
  385. watch: {
  386. showModel: function (val) {
  387. this.showModelThis = val;
  388. if (val) {
  389. this.initForm();
  390. }
  391. },
  392. showModelThis(val) {
  393. if (!val) {
  394. this.$emit("cancel");
  395. }
  396. },
  397. },
  398. methods: {
  399. // 全选/全不选
  400. handleCheckAllChange(checkAll, index, item, subIndex) {
  401. this.actionList[index].child[subIndex].checkAll = checkAll;
  402. this.$set(this.actionList, index, item);
  403. this.actionList[index].child[subIndex].action.forEach((element) => {
  404. const findindex = this.actionList[index].child[
  405. subIndex
  406. ].checkList.findIndex((findItem) => findItem === element.id);
  407. if (checkAll && findindex == -1) {
  408. this.actionList[index].child[subIndex].checkList.push(element.id);
  409. } else if (!checkAll && findindex > -1) {
  410. this.actionList[index].child[subIndex].checkList.splice(findindex, 1);
  411. }
  412. });
  413. },
  414. // 全选/全不选
  415. handleFieldAllChange(fieldAll, index, item, subIndex) {
  416. this.actionList[index].child[subIndex].fieldAll = fieldAll;
  417. this.$set(this.actionList, index, item);
  418. this.actionList[index].child[subIndex].action_data.forEach((element) => {
  419. const findindex = this.actionList[index].child[
  420. subIndex
  421. ].fieldList.findIndex((findItem) => findItem === element.id);
  422. if (fieldAll && findindex == -1) {
  423. this.actionList[index].child[subIndex].fieldList.push(element.id);
  424. } else if (!fieldAll && findindex > -1) {
  425. this.actionList[index].child[subIndex].fieldList.splice(findindex, 1);
  426. }
  427. });
  428. },
  429. // 复选框组内的选中/不选中
  430. handleCheckedGroupChange(event, index, item, subIndex) {
  431. this.actionList[index].child[subIndex].checkAll = this.actionList[
  432. index
  433. ].child[subIndex].action.every(
  434. (evitem) =>
  435. this.actionList[index].child[subIndex].checkList.findIndex(
  436. (finditem) => finditem === evitem.id
  437. ) > -1
  438. );
  439. this.$set(this.actionList, index, item);
  440. },
  441. // 复选框组内的选中/不选中
  442. handleFieldGroupChange(event, index, item, subIndex) {
  443. this.actionList[index].child[subIndex].fieldAll = this.actionList[
  444. index
  445. ].child[subIndex].action_data.every(
  446. (evitem) =>
  447. this.actionList[index].child[subIndex].fieldList.findIndex(
  448. (finditem) => finditem === evitem.id
  449. ) > -1
  450. );
  451. this.$set(this.actionList, index, item);
  452. },
  453. // 单项复选框选中/不选中
  454. handleCheckedChange(checked, id, index, subIndex, item) {
  455. // console.log(checked, id, index, subIndex);
  456. if (checked) {
  457. // 选中时检查pid的选中状态
  458. this.actionList[index].child[subIndex].checkList.indexOf(id) == -1 &&
  459. this.actionList[index].child[subIndex].checkList.push(id);
  460. } else {
  461. const find = this.actionList[index].child[subIndex].checkList.findIndex(
  462. (e) => e == id
  463. );
  464. if (find > -1) {
  465. this.actionList[index].child[subIndex].checkList.splice(find, 1);
  466. }
  467. this.actionList[index].child[subIndex].checkAll = false;
  468. }
  469. this.$set(this.actionList, index, item);
  470. },
  471. // 单项复选框选中/不选中
  472. handleFieldChange(checked, id, index, subIndex, item) {
  473. // console.log(checked, id, index, subIndex);
  474. if (checked) {
  475. // 选中时检查pid的选中状态
  476. this.actionList[index].child[subIndex].fieldList.indexOf(id) == -1 &&
  477. this.actionList[index].child[subIndex].fieldList.push(id);
  478. } else {
  479. const find = this.actionList[index].child[subIndex].fieldList.findIndex(
  480. (e) => e == id
  481. );
  482. if (find > -1) {
  483. this.actionList[index].child[subIndex].fieldList.splice(find, 1);
  484. }
  485. this.actionList[index].child[subIndex].fieldAll = false;
  486. }
  487. this.$set(this.actionList, index, item);
  488. // console.log(this.actionList[index].child[subIndex]);
  489. },
  490. async initForm() {
  491. this.loading = true;
  492. if (this.id === "add") {
  493. this.title = "添加角色";
  494. // this.ruleForm.isAdmin = 0;
  495. this.rulesThis = this.rules;
  496. await this.resetForm();
  497. await this.initActionList();
  498. this.loading = false;
  499. } else {
  500. if (this.isDetail) {
  501. this.title = "角色";
  502. this.rulesThis = {};
  503. } else {
  504. this.title = "修改角色";
  505. this.rulesThis = this.rules;
  506. }
  507. await this.resetForm();
  508. await this.initActionList();
  509. await this.initData();
  510. this.loading = false;
  511. }
  512. },
  513. async initData() {
  514. const res = await asyncRequest.detail({ roleid: this.id });
  515. if (res && res.code === 0 && res.data) {
  516. let resD = res.data;
  517. resD.private_field =
  518. resD.private_field === "" ? [] : resD.private_field;
  519. this.ruleForm = resD;
  520. if (resD.action && resD.action.length > 0) {
  521. this.action = resD.action;
  522. } else {
  523. this.action = [];
  524. }
  525. if (resD.action_data && resD.action_data.length > 0) {
  526. this.action_data = resD.action_data;
  527. } else {
  528. this.action_data = [];
  529. }
  530. if (resD.private_data === "") {
  531. resD.private_data = [];
  532. }
  533. if (resD.private_data && resD.private_data.length > 0) {
  534. this.private_data = resD.private_data;
  535. } else {
  536. this.private_data = [];
  537. }
  538. const arr = JSON.parse(JSON.stringify(this.actionList));
  539. arr.map((x) => {
  540. if (x.child && x.child.length > 0) {
  541. x.child.map((y) => {
  542. if (y.action && y.action.length > 0) {
  543. y.action.map((z) => {
  544. const Aindex = this.action.findIndex((a) => a === z.id);
  545. if (Aindex !== -1) {
  546. y.checkList.push(this.action[Aindex]);
  547. }
  548. return z;
  549. });
  550. if (y.action.length === y.checkList.length) {
  551. y.checkAll = true;
  552. }
  553. }
  554. if (y.action_data && y.action_data.length > 0) {
  555. y.action_data.map((z) => {
  556. const Bindex = this.action_data.findIndex((a) => a === z.id);
  557. if (Bindex !== -1) {
  558. y.fieldList.push(this.action_data[Bindex]);
  559. }
  560. return z;
  561. });
  562. if (y.action_data.length === y.fieldList.length) {
  563. y.fieldAll = true;
  564. }
  565. }
  566. if (y.private && y.private.length === 2) {
  567. let Cindex = this.private_data.findIndex((a) => a === y.id);
  568. if (Cindex !== -1) {
  569. y.is_private_change = "1";
  570. } else {
  571. y.is_private_change = "0";
  572. }
  573. } else {
  574. y.is_private_change = "0";
  575. }
  576. return y;
  577. });
  578. }
  579. return x;
  580. });
  581. this.actionList = arr;
  582. } else if (res && res.code >= 100 && res.code <= 104) {
  583. await this.logout();
  584. } else {
  585. this.$message.warning(res.message);
  586. }
  587. },
  588. async initActionList() {
  589. const res = await asyncRequest.actionList({});
  590. if (res && res.code === 0) {
  591. const list = res.data;
  592. let arr = list.filter((item) => item.child && item.child.length > 0);
  593. arr = arr.map((x) => {
  594. x.child.map((y) => {
  595. y.checkAll = false;
  596. y.checkList = [];
  597. y.fieldAll = false;
  598. y.fieldList = [];
  599. y.is_private_change = "0";
  600. if (y.is_private === "0") {
  601. y.private = [];
  602. } else {
  603. y.private = [
  604. {
  605. id: "0",
  606. label: "公有数据",
  607. },
  608. {
  609. id: "1",
  610. label: "私有数据",
  611. },
  612. ];
  613. }
  614. return y;
  615. });
  616. return x;
  617. });
  618. this.actionList = arr;
  619. } else if (res && res.code >= 100 && res.code <= 104) {
  620. await this.logout();
  621. } else {
  622. this.$message.warning(res.message);
  623. }
  624. },
  625. async resetForm() {
  626. // 重置
  627. await this.$nextTick(() => {
  628. if (this.$refs.ruleForm) {
  629. this.$refs.ruleForm.resetFields();
  630. this.$refs.ruleForm.clearValidate();
  631. this.ruleForm = {
  632. role_name: "",
  633. private_field: [],
  634. level: "1",
  635. };
  636. }
  637. });
  638. },
  639. async submitForm() {
  640. if(!this.currentCompany){
  641. this.$message.warning('请在右上角选择一家公司');
  642. return
  643. }
  644. await this.$refs.ruleForm.validate(async (valid) => {
  645. if (valid) {
  646. if (this.loading) {
  647. return;
  648. }
  649. this.action_data = []; // 字段数据
  650. this.action = []; // 功能数据
  651. let arr = [];
  652. this.actionList.forEach((x) => {
  653. x.child.forEach((y) => {
  654. this.action_data.push(...y.fieldList);
  655. this.action.push(...y.checkList);
  656. if (y.is_private_change === "1") {
  657. arr.push(y.id);
  658. }
  659. });
  660. });
  661. // this.action_data.length === 0 ||和字段
  662. if (this.action.length === 0) {
  663. this.$message.warning("请选择功能!");
  664. } else {
  665. this.loading = true;
  666. const model = {
  667. roleid: this.id,
  668. role_name: this.ruleForm.role_name,
  669. // private_field: JSON.parse(
  670. // JSON.stringify(this.ruleForm.private_field)
  671. // ),
  672. is_allow_see_price:this.ruleForm.is_allow_see_price,
  673. level: this.ruleForm.level,
  674. action: this.action,
  675. action_data: this.action_data,
  676. private_data: arr,
  677. };
  678. let res = {};
  679. if (this.id === "add") {
  680. delete model["roleid"];
  681. model.companyNo = this.currentCompany;
  682. res = await asyncRequest.add(model);
  683. } else {
  684. model.companyNo = this.ruleForm.companyNo;
  685. res = await asyncRequest.update(model);
  686. }
  687. this.loading = false;
  688. if (res && res.code === 0) {
  689. const title = this.id === "add" ? "添加成功" : "修改成功";
  690. this.$notify.success({
  691. title,
  692. message: "",
  693. });
  694. this.showModelThis = false;
  695. // 刷新
  696. this.$emit("refresh");
  697. } else if (res && res.code >= 100 && res.code <= 104) {
  698. await this.logout();
  699. } else {
  700. this.$message.warning(res.message);
  701. }
  702. }
  703. } else {
  704. console.log("error submit!!");
  705. return false;
  706. }
  707. });
  708. },
  709. },
  710. };
  711. </script>
  712. <style lang="scss" scoped>
  713. .role {
  714. .quanxian-main {
  715. width: 100%;
  716. display: flex;
  717. .quanxian-title {
  718. width: 84px;
  719. position: relative;
  720. padding: 8px 0 0 7px;
  721. }
  722. .rule-view {
  723. width: calc(100% - 84px);
  724. position: relative;
  725. height: 550px;
  726. overflow-y: scroll;
  727. border-top: 1px solid #dfe6ec;
  728. border-left: 1px solid #dfe6ec;
  729. // padding: 0 0 0 16px;
  730. .ffff {
  731. width: 100%;
  732. display: flex;
  733. align-items: stretch;
  734. .ftitle {
  735. width: 110px;
  736. text-align: center;
  737. border-right: 1px solid #dfe6ec;
  738. border-bottom: 1px solid #dfe6ec;
  739. padding: 12px 14px;
  740. display: flex;
  741. align-items: center;
  742. span {
  743. display: inline-block;
  744. width: 100%;
  745. font-size: 17px;
  746. text-align: center;
  747. color: #97a8be;
  748. }
  749. }
  750. .fbody {
  751. width: calc(100% - 110px);
  752. .fbody-item {
  753. border-right: 1px solid #dfe6ec;
  754. border-bottom: 1px solid #dfe6ec;
  755. .stitle {
  756. padding: 18px 18px 12px 18px;
  757. border-bottom: 1px dashed #dfe6ec;
  758. font-size: 14px;
  759. color: #97a8be;
  760. ._h2 {
  761. display: inline-block;
  762. // width: 100px;
  763. }
  764. }
  765. .scheck {
  766. padding: 15px 0 10px 0;
  767. display: flex;
  768. width: 100%;
  769. .checkAll {
  770. width: 140px;
  771. text-align: right;
  772. padding: 0 35px 0 0;
  773. }
  774. .checkItem {
  775. width: calc(100% - 140px);
  776. }
  777. }
  778. .sfield {
  779. padding: 0 0 10px 0;
  780. display: flex;
  781. width: 100%;
  782. .checkAll {
  783. width: 140px;
  784. text-align: right;
  785. padding: 0 35px 0 0;
  786. }
  787. .checkItem {
  788. width: calc(100% - 140px);
  789. }
  790. }
  791. }
  792. }
  793. }
  794. // .rule-list {
  795. // height: 100%;
  796. // overflow-y: auto;
  797. // padding: 0 0 80px 0;
  798. // .rule-title {
  799. // .title {
  800. // font-size: 20px;
  801. // color: #333;
  802. // }
  803. // .desc {
  804. // margin: 10px 0;
  805. // font-size: 12px;
  806. // color: #999;
  807. // }
  808. // }
  809. // .rule-item {
  810. // .title {
  811. // margin: 30px 30px 10px 0;
  812. // font-size: 18px;
  813. // padding-bottom: 12px;
  814. // border-bottom: 1px solid #eee;
  815. // color: #333;
  816. // .el-checkbox {
  817. // margin-left: 10px;
  818. // }
  819. // }
  820. // .el-checkbox-group {
  821. // margin: 10px 30px 30px 0;
  822. // .el-checkbox {
  823. // line-height: 30px;
  824. // }
  825. // .children-checkbox-hr {
  826. // margin: 8px 0;
  827. // border: none;
  828. // border-top: 2px dotted #eee;
  829. // }
  830. // }
  831. // }
  832. // }
  833. }
  834. }
  835. }
  836. </style>