ruleManage.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897
  1. <template>
  2. <div class="container-box">
  3. <el-row :gutter="20" class="h-100">
  4. <el-col :span="6" class="h-100">
  5. <div class="h-100">
  6. <el-card class="box-card h-100">
  7. <div class="tree-container">
  8. <el-scrollbar>
  9. <el-tree
  10. lazy
  11. :load="loadNode"
  12. @node-click="handleNodeClick"
  13. :props="defaultProps"
  14. :expand-on-click-node="false"
  15. highlight-current
  16. node-key="id"
  17. ref="tree"
  18. ></el-tree>
  19. </el-scrollbar>
  20. </div>
  21. </el-card>
  22. </div>
  23. </el-col>
  24. <template v-if="!isShowDetail">
  25. <el-col :span="18" class="h-100" v-if="isShowList">
  26. <div class="h-100 rule-box-all">
  27. <el-card class="box-card h-100">
  28. <div slot="header" class="clearfix">
  29. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBackFirst"></i>
  30. <span>退出</span>
  31. <div style="float: right;">
  32. <el-button
  33. icon="el-icon-plus"
  34. size="small"
  35. style="background-color:#2550A2;color:white;font-weight:bold;"
  36. plain
  37. @click="addRule"
  38. >新增
  39. </el-button>
  40. <el-button
  41. icon="el-icon-document-copy"
  42. size="small"
  43. style="background-color:#FFA042;color:white;font-weight:bold;"
  44. plain
  45. @click="manageFolder"
  46. >管理
  47. </el-button>
  48. </div>
  49. </div>
  50. <div class="rule-box">
  51. <div class="rule-box-item" v-for="item in ruleItemOptions" :key="item.id" @click="ruleDetailClick">
  52. <div class="rule-box-item-icon">
  53. <i class="el-icon-folder" style=" cursor: pointer; font-size: 48px;color:orange"></i>
  54. </div>
  55. <div class="rule-box-item-title">{{ item.title }}</div>
  56. </div>
  57. </div>
  58. <el-pagination
  59. style="margin-top: 30px;text-align: center;"
  60. @size-change="handleSizeChange"
  61. @current-change="handleCurrentChange"
  62. :current-page="currentPage"
  63. :page-size="pageSize"
  64. :total="ruleItemOptions.length"
  65. layout="prev, pager, next"
  66. class="pagination"
  67. >
  68. </el-pagination>
  69. </el-card>
  70. </div>
  71. </el-col>
  72. <el-col :span="18" class="h-100" v-if="!isShowList">
  73. <div class="h-100 rule-box-all">
  74. <el-card class="box-card h-100">
  75. <div slot="header" class="clearfix">
  76. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBack"></i>
  77. <span @click="goBack">返回上一级</span>
  78. <div style="float: right;">
  79. <el-button
  80. icon="el-icon-plus"
  81. size="small"
  82. style="background-color:#2550A2;color:white;font-weight:bold;"
  83. plain
  84. @click="addFile"
  85. >新增
  86. </el-button>
  87. <el-button
  88. icon="el-icon-document-copy"
  89. size="small"
  90. style="background-color:#FFA042;color:white;font-weight:bold;"
  91. plain
  92. @click="manageFolder"
  93. >管理
  94. </el-button>
  95. </div>
  96. </div>
  97. <div class="rule-box">
  98. <div class="rule-box-item" v-for="item in ruleItemOptions" :key="item.id" @click="ruleDetailClick1">
  99. <div class="rule-box-item-icon">
  100. <i class="el-icon-tickets" style=" cursor: pointer; font-size: 48px;color:#2550A2"></i>
  101. </div>
  102. <div class="rule-box-item-title">{{ item.title }}</div>
  103. </div>
  104. </div>
  105. <el-pagination
  106. style="margin-top: 30px;text-align: center;"
  107. @size-change="handleSizeChange"
  108. @current-change="handleCurrentChange"
  109. :current-page="currentPage"
  110. :page-size="pageSize"
  111. :total="ruleItemOptions.length"
  112. layout="prev, pager, next"
  113. class="pagination"
  114. >
  115. </el-pagination>
  116. </el-card>
  117. </div>
  118. </el-col>
  119. </template>
  120. <el-col :span="18" class="h-100" v-if="isShowDetail">
  121. <el-card class="box-card h-100" v-if="isShowYpList">
  122. <div slot="header" class="clearfix">
  123. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBack1"></i>
  124. <span>返回上一级</span>
  125. </div>
  126. <div class="box-card-title">
  127. GB 175-2023
  128. </div>
  129. <div class="box-card-content1">
  130. <div class="box-card-content1-left">
  131. <div class="box-card-content1-left-item">
  132. 下达日期:2023-12-12
  133. </div>
  134. <div class="box-card-content1-left-item">
  135. 实施日期:2023-12-12
  136. </div>
  137. <div>
  138. <i class="el-icon-document"></i>文件名称.pdf
  139. </div>
  140. </div>
  141. <div class="box-card-content1-right">
  142. <el-button type="danger" size="small" @click="previewRes">效果预览</el-button>
  143. <el-button type="warning" size="small">规范更新</el-button>
  144. </div>
  145. </div>
  146. <div class="box-card-content2">
  147. <div class="box-card-content2-top">
  148. <div class="box-card-content2-title">
  149. <div class="title-container">
  150. <span>样品信息</span>
  151. <i class="el-icon-circle-plus" @click="addYp"></i>
  152. </div>
  153. </div>
  154. <div class="box-card-content2-list">
  155. <div class="box-card-content2-list-item" v-for="(item, index) in ypList" :key="index">
  156. <div class="box-card-content2-list-item-title">
  157. <span class="eg">if()</span>
  158. <span>{{ item.name }}</span>
  159. </div>
  160. <div class="box-card-content2-list-item-list">
  161. <span class="basic-info">基础信息</span>
  162. <div class="box-card-content2-list-item-list-basic">
  163. <div class="basic-item-info" v-for="(item1,index1) in item.basic":key="index1" >
  164. {{ item1.name }}
  165. </div>
  166. <div class="operation-icons">
  167. <i class="el-icon-edit" @click.stop="handleEdit(item, index)"></i>
  168. <i class="el-icon-delete" @click.stop="handleDelete(index)"></i>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="box-card-content2-top">
  176. <div class="box-card-content2-title">
  177. <div class="title-container">
  178. <span>技术指标</span>
  179. <i class="el-icon-circle-plus" @click="addJs"></i>
  180. </div>
  181. </div>
  182. <div class="box-card-content2-list">
  183. <div class="box-card-content2-list-item" v-for="(item, index) in jsList" :key="index">
  184. <div class="box-card-content2-list-item-title">
  185. <span class="eg">else()</span>
  186. <span>{{ item.name }}</span>
  187. </div>
  188. <div class="box-card-content2-list-item-list">
  189. <span class="basic-info">内容</span>
  190. <div class="box-card-content2-list-item-list-basic">
  191. <div class="basic-item-info" v-for="(item1,index1) in item.basic":key="index1" >
  192. {{ item1.name }}
  193. </div>
  194. <div class="operation-icons">
  195. <i class="el-icon-edit" @click.stop="handleEdit(item, index)"></i>
  196. <i class="el-icon-delete" @click.stop="handleDelete(index)"></i>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </el-card>
  205. <el-card class="box-card h-100" v-if="!isShowYpList&&!isShowJsList">
  206. <template >
  207. <div slot="header" class="clearfix" >
  208. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="showYpList"></i>
  209. <span @click="showYpList">退出</span>
  210. </div>
  211. <div class="add-yp-title">
  212. <span>新增</span>
  213. </div>
  214. <div class="add-yp-detail">
  215. <el-form label-position="left" label-width="80px" :model="ypDetail" :rules="ypRuleForm">
  216. <el-form-item label="样品信息" prop="name">
  217. <el-input v-model="ypDetail.name"></el-input>
  218. </el-form-item>
  219. <el-form-item label="基础信息">
  220. <div class="input-with-icon" v-for="(item, index) in ypDetail.basic" :key="index">
  221. <el-input v-model="item.name"></el-input>
  222. <i class="el-icon-circle-plus-outline" @click="addBasicInfo" v-if="index!==0"></i>
  223. <i class="el-icon-remove-outline" @click="removeBasicInfo(index)"></i>
  224. </div>
  225. </el-form-item>
  226. </el-form>
  227. </div>
  228. <div class="add-yp-footer">
  229. <el-button type="primary">保存</el-button>
  230. </div>
  231. </template>
  232. </el-card>
  233. <el-card v-if="isShowJsList&&!isShowYpList">
  234. <div slot="header" class="clearfix" >
  235. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="showYpList"></i>
  236. <span @click="showYpList">退出</span>
  237. </div>
  238. <div class="add-yp-title">
  239. <span>新增</span>
  240. <div>
  241. <el-button size="small" style="background: rgb(168, 86, 248);color: white;" icon="el-icon-office-building" @click="conditionsSet">条件设置</el-button>
  242. <el-button size="small" style="background:rgb(37, 80, 162);;color: white;" icon="el-icon-connection" @click="linkEle">关联元素</el-button>
  243. </div>
  244. </div>
  245. <div class="add-yp-detail">
  246. <el-form label-position="left" label-width="80px" :model="jsDetail" :rules="jsRuleForm">
  247. <el-form-item label="检测项" prop="name">
  248. <el-input v-model="jsDetail.name"></el-input>
  249. </el-form-item>
  250. <el-form-item label="技术指标">
  251. <div class="input-with-icon" v-for="(item, index) in jsDetail.basic" :key="index">
  252. <el-input placeholder="请输入内容" v-model="item.name" class="input-with-select">
  253. <el-select v-model="item.select" slot="prepend" placeholder="请选择符号" style="width: 150px;">
  254. <el-option v-for="(item1,index) in fqOptions" :key="index" :label="item1.label" :value="item1.value"></el-option>
  255. </el-select>
  256. </el-input>
  257. <i class="el-icon-circle-plus-outline" @click="addBasicInfo1" ></i>
  258. <i class="el-icon-remove-outline" @click="removeBasicInfo1(index)" v-if="index!==0"></i>
  259. </div>
  260. </el-form-item>
  261. </el-form>
  262. </div>
  263. <div class="add-yp-footer">
  264. <el-button type="primary">保存</el-button>
  265. </div>
  266. </el-card>
  267. </el-col>
  268. </el-row>
  269. <!-- 新增文件夹 -->
  270. <el-dialog
  271. title="新增"
  272. :visible.sync="addDialogVisible"
  273. width="30%"
  274. append-to-body
  275. >
  276. <div class="input-container">
  277. <span>规范文件夹名称</span>
  278. <el-input v-model="titleInput" placeholder="请输入内容" style="width: 300px;"></el-input>
  279. </div>
  280. <span slot="footer" class="dialog-footer">
  281. <el-button @click="addDialogVisible = false">取 消</el-button>
  282. <el-button type="primary" @click="addDialogVisible = false">确 定</el-button>
  283. </span>
  284. </el-dialog>
  285. <!-- 管理规范 -->
  286. <el-dialog title="管理" :visible.sync="manageVisible" width="50%" append-to-body>
  287. <el-table :data="manageData" border height="550">
  288. <el-table-column property="name" label="规范名称" >
  289. <template slot-scope="scope">
  290. <el-input v-model="scope.row.name" placeholder="请输入内容"></el-input>
  291. </template>
  292. </el-table-column>
  293. <el-table-column label="操作" width="200">
  294. <template slot-scope="scope">
  295. <el-button type="text" size="small" style="color: rgb(219, 55, 55);" @click="delManange(scope.$index)">删除</el-button>
  296. </template>
  297. </el-table-column>
  298. </el-table>
  299. <div slot="footer" class="dialog-footer">
  300. <el-button @click="manageVisible = false">取 消</el-button>
  301. <el-button type="primary" @click="manageVisible = false">确 定</el-button>
  302. </div>
  303. </el-dialog>
  304. <!-- 新增规范文件 -->
  305. <el-dialog title="新增" :visible.sync="addFileDialogVisible" append-to-body width="30%">
  306. <el-form :model="fileForm" label-position="left" label-width="80px">
  307. <el-form-item label="规范名称" >
  308. <el-input v-model="fileForm.name" ></el-input>
  309. </el-form-item>
  310. <el-form-item label="下达日期" >
  311. <el-date-picker
  312. style="width: 100%;"
  313. v-model="fileForm.date1"
  314. type="date"
  315. placeholder="选择日期">
  316. </el-date-picker>
  317. </el-form-item>
  318. <el-form-item label="实施日期" >
  319. <el-date-picker
  320. style="width: 100%;"
  321. v-model="fileForm.date2"
  322. type="date"
  323. placeholder="选择日期">
  324. </el-date-picker>
  325. </el-form-item>
  326. <el-form-item label="规范文件" >
  327. <el-upload
  328. class="upload-demo"
  329. action="https://jsonplaceholder.typicode.com/posts/"
  330. :file-list="fileList">
  331. <el-button size="small" type="primary">点击上传</el-button>
  332. <div slot="tip" class="el-upload__tip">允许文件格式.pdf</div>
  333. </el-upload>
  334. </el-form-item>
  335. </el-form>
  336. <div slot="footer" class="dialog-footer">
  337. <el-button @click="dialogFormVisible = false">取 消</el-button>
  338. <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
  339. </div>
  340. </el-dialog>
  341. <!-- 条件设置 -->
  342. <ConditionsSet ref="conditionsSetRef" @confirm="handleConditionsConfirm" />
  343. <!-- 关联元素 -->
  344. <LinkEle ref="linkEleRef" @confirm="confirmLinkEle" />
  345. <!-- 效果预览 -->
  346. <PreviewResult ref="previewResultRef" />
  347. </div>
  348. </template>
  349. <script>
  350. import {getLazytree} from "@/api/manager/wbsprivate";
  351. import ConditionsSet from './ConditionsSet.vue'
  352. import LinkEle from "./LinkEle.vue";
  353. import PreviewResult from './PreviewResult.vue'
  354. export default {
  355. components: {
  356. ConditionsSet,
  357. LinkEle,
  358. PreviewResult
  359. },
  360. data() {
  361. return {
  362. id: '',
  363. parentId: '',
  364. tenant_id:'',
  365. projectid:'',
  366. treeId: '',
  367. defaultProps: {
  368. children: "children",
  369. label: "title",
  370. isLeaf: function (data) {
  371. return !data.hasChildren || (data.isExistForm==1);
  372. },
  373. },
  374. ruleItemOptions:[
  375. {id:1,title:'规范名称'},
  376. {id:2,title:'规范名称'},
  377. {id:3,title:'规范名称'},
  378. {id:1,title:'规范名称'},
  379. {id:2,title:'规范66名称'},
  380. {id:3,title:'规范名称'},
  381. ],
  382. addDialogVisible:false,
  383. titleInput:'',
  384. isShowList:true,
  385. currentPage: 1,
  386. pageSize: 40, // 8列 * 5行 = 40
  387. isShowYpList:true,
  388. isShowDetail:false,
  389. ypDetail: {
  390. name: '',
  391. basic: [{ name: '' }, { name: '' }, { name: '' }, { name: '' }]
  392. },
  393. ypRuleForm: {
  394. name: [
  395. { required: true, message: '请输入样品名称', trigger: 'blur' }
  396. ],
  397. },
  398. manageVisible: false,
  399. manageData: [
  400. { name: '规范1' },
  401. { name: '规范2' },
  402. { name: '规范3' },
  403. { name: '规范4' },
  404. { name: '规范5' }
  405. ],
  406. addFileDialogVisible:false,
  407. fileForm:{},
  408. fileList:[],
  409. ypList:[
  410. {id:1,name:'样品名称',
  411. basic:
  412. [{name:'基本信息1'} , {name:'基本信息2'} , {name:'基本信息3'} , {name:'基本信息4'}]
  413. },
  414. ],
  415. jsList:[
  416. {id:1,name:'技术指标名称',
  417. basic:
  418. [{name:'基本信息1'} , {name:'基本信息2'} , {name:'基本信息3'} , {name:'基本信息4'}]
  419. },
  420. ],
  421. isShowJsList:false,
  422. jsDetail: {
  423. name: '',
  424. basic: [{ name: '',select:[] }, ]
  425. },
  426. jsRuleForm: {
  427. name: [
  428. { required: true, message: '请输入技术指标名称', trigger: 'blur' }
  429. ],
  430. },
  431. fqOptions: [
  432. { label: '>', value: '>', },
  433. { label: '=', value: '=', },
  434. { label: '<', value: '<' },
  435. { label: '>=', value: '>=' },
  436. { label: '<=', value: '<=' },
  437. { label: '!=', value: '!=' },
  438. ],
  439. conditionsSetVisible:false//条件设置弹窗是否显示
  440. };
  441. },
  442. computed: {
  443. currentPageData() {
  444. const start = (this.currentPage - 1) * this.pageSize
  445. const end = start + this.pageSize
  446. return this.ruleItemOptions.slice(start, end)
  447. }
  448. },
  449. created(){
  450. console.log(this.$route.query,'this.$route.query;');
  451. const { id, tenant_id,projectid} = this.$route.query;
  452. this.id = id;
  453. this.parentId = 0;
  454. this.tenant_id = tenant_id;
  455. this.projectid = projectid;
  456. },
  457. methods: {
  458. handleNodeClick(data) {
  459. console.log(data);
  460. this.treeId = data.id;
  461. },
  462. loadNode(node, resolve) {
  463. let pid = 0;
  464. if (node.level != 0) {
  465. pid = node.data.id;
  466. }
  467. getLazytree(this.id, pid, this.tenant_id, this.projectid, {
  468. wbsType: 2,
  469. }).then((res) => {
  470. let arr = [];
  471. if (Array.isArray(res.data.data)) {
  472. arr = res.data.data;
  473. }
  474. return resolve(arr);
  475. });
  476. },
  477. goBackFirst() {
  478. this.isShowList = true;
  479. this.$router.go(-1);
  480. },
  481. goBack() {
  482. this.isShowList = true;
  483. },
  484. goBack1() {
  485. this.isShowDetail = false;
  486. },
  487. addRule(){
  488. this.addDialogVisible = true;
  489. },
  490. ruleDetailClick(){
  491. this.isShowList = false;
  492. },
  493. ruleDetailClick1(){
  494. this.isShowDetail = true;
  495. },
  496. addFile(){
  497. //新增规范文件
  498. this.addFileDialogVisible = true;
  499. },
  500. handleCurrentChange(val) {
  501. this.currentPage = val
  502. },
  503. handleSizeChange(val) {
  504. this.pageSize = val
  505. this.currentPage = 1
  506. },
  507. addYp(){
  508. this.isShowYpList = false;
  509. this.isShowJsList = false;
  510. },
  511. showYpList() {
  512. this.isShowYpList = true;
  513. },
  514. // 添加基础信息行
  515. addBasicInfo() {
  516. this.ypDetail.basic.push({ name: '' });
  517. },
  518. // 删除基础信息行
  519. removeBasicInfo(index) {
  520. this.ypDetail.basic.splice(index, 1);
  521. },
  522. // 管理文件夹
  523. manageFolder(){
  524. this.manageVisible = true;
  525. },
  526. delManange(index){
  527. this.$confirm('删除后,数据将无法恢复,是否确认删除!', '提示', {
  528. confirmButtonText: '确定',
  529. cancelButtonText: '取消',
  530. type: 'warning'
  531. }).then(() => {
  532. this.manageData.splice(index, 1);
  533. })
  534. },
  535. handleEdit(item, index) {
  536. // 处理编辑逻辑
  537. console.log('编辑项目:', item, index);
  538. },
  539. handleDelete(index) {
  540. this.$confirm('删除后,数据无法恢复,是否确认删除?', '删除确认', {
  541. confirmButtonText: '确定',
  542. cancelButtonText: '取消',
  543. type: 'warning'
  544. }).then(() => {
  545. this.ypList.splice(index, 1);
  546. this.$message.success('删除成功');
  547. }).catch(() => {});
  548. },
  549. handleEdit1(item, index) {
  550. // 处理编辑逻辑
  551. console.log('编辑项目:', item, index);
  552. },
  553. handleDelete1(index) {
  554. this.$confirm('删除后,数据无法恢复,是否确认删除?', '删除确认', {
  555. confirmButtonText: '确定',
  556. cancelButtonText: '取消',
  557. type: 'warning'
  558. }).then(() => {
  559. this.jsList.splice(index, 1);
  560. this.$message.success('删除成功');
  561. }).catch(() => {});
  562. },
  563. //新增技术指标
  564. addJs(){
  565. this.isShowJsList = true;
  566. this.isShowYpList = false;
  567. },
  568. addBasicInfo1() {
  569. this.jsDetail.basic.push({ name: '' });
  570. },
  571. // 删除基础信息行
  572. removeBasicInfo1(index) {
  573. this.jsDetail.basic.splice(index, 1);
  574. },
  575. //条件设置
  576. conditionsSet(){
  577. if(this.jsDetail.basic[0].name === ''|| this.jsDetail.basic[0].select.length === 0) {
  578. this.$message.error('请先添加技术指标内容');
  579. return;
  580. }
  581. this.$refs.conditionsSetRef.show(this.jsDetail.basic)
  582. },
  583. // 添加确认取消处理方法
  584. handleConditionsConfirm() {
  585. console.log('确认条件设置')
  586. },
  587. handleConditionsCancel() {
  588. console.log('取消条件设置')
  589. },
  590. //关联元素
  591. linkEle() {
  592. if(this.jsDetail.basic[0].name === ''|| this.jsDetail.basic[0].select.length === 0) {
  593. this.$message.error('请先添加技术指标内容');
  594. return;
  595. }
  596. this.$refs.linkEleRef.show(this.jsDetail.basic, this.treeId,this.id, this.projectid);
  597. },
  598. confirmLinkEle() {
  599. console.log('确认关联元素')
  600. },
  601. //效果预览
  602. previewRes() {
  603. this.$refs.previewResultRef.show()
  604. }
  605. }
  606. }
  607. </script>
  608. <style scoped lang="scss">
  609. .container-box {
  610. height: calc(100vh - 120px);
  611. box-sizing: border-box;
  612. }
  613. .h-100 {
  614. height: 100%;
  615. }
  616. .tree-container {
  617. height: calc(100vh - 120px);
  618. overflow-y: auto;
  619. }
  620. .box-card {
  621. display: flex;
  622. flex-direction: column;
  623. height: 100%;
  624. // 内容区域
  625. .el-card__body {
  626. flex: 1;
  627. display: flex;
  628. flex-direction: column;
  629. overflow: hidden;
  630. }
  631. }
  632. .rule-box{
  633. width: 100%;
  634. display: grid;
  635. grid-template-columns: repeat(8, 1fr);
  636. grid-template-rows: repeat(4, 1fr);
  637. gap: 50px;
  638. padding: 20px;
  639. height: 600px;
  640. overflow-y:hidden;
  641. .rule-box-item{
  642. text-align: center;
  643. display: flex;
  644. flex-direction: column;
  645. align-items: center;
  646. }
  647. .rule-box-item-icon {
  648. margin-bottom: 8px;
  649. }
  650. .rule-box-item-title {
  651. font-size: 14px;
  652. width: 100%;
  653. overflow: hidden;
  654. text-overflow: ellipsis;
  655. white-space: nowrap;
  656. }
  657. }
  658. .input-container {
  659. display: flex;
  660. align-items: center;
  661. }
  662. .input-container span {
  663. margin-right: 10px; /* 根据需要调整间距 */
  664. }
  665. .box-card-title{
  666. font-weight: bolder;
  667. font-size: 24px;
  668. }
  669. .box-card-content1{
  670. margin-top: 10px;
  671. display: flex;
  672. justify-content: space-between;
  673. width: 100%;
  674. .box-card-content1-left{
  675. display: flex;
  676. .box-card-content1-left-item{
  677. margin-right: 25px;
  678. }
  679. }
  680. }
  681. .box-card-content2{
  682. margin-top: 10px;
  683. .box-card-content2-title{
  684. color: rgba(130, 130, 130, 1);
  685. font-size: 10px;;
  686. width: 98%;
  687. padding-left: 20px;
  688. font-size: 18px;
  689. line-height: 40px;
  690. background: rgb(240, 240, 240);
  691. .title-container {
  692. display: flex;
  693. justify-content: space-between;
  694. align-items: center;
  695. padding-right: 20px;
  696. i {
  697. cursor: pointer;
  698. font-size: 22px;
  699. color: #2550A2;
  700. // 添加过渡效果
  701. &:hover {
  702. color: #409EFF;
  703. }
  704. }
  705. }
  706. }
  707. }
  708. .box-card-content2-bottom{
  709. margin-top: 20px;
  710. }
  711. .add-yp-title{
  712. font-size: 20px;
  713. font-weight: bold;
  714. padding: 10px;
  715. display: flex;
  716. justify-content: space-between;
  717. }
  718. .input-with-icon {
  719. display: flex;
  720. align-items: center;
  721. margin-bottom: 15px;
  722. .el-input {
  723. flex: 1;
  724. }
  725. i {
  726. margin-left: 10px;
  727. font-size: 20px;
  728. cursor: pointer;
  729. &.el-icon-circle-plus-outline {
  730. color: #409EFF;
  731. &:hover {
  732. color: #66b1ff;
  733. }
  734. }
  735. &.el-icon-remove-outline {
  736. color: #F56C6C;
  737. &:hover {
  738. color: #f78989;
  739. }
  740. }
  741. }
  742. }
  743. .add-yp-detail{
  744. flex: 1;
  745. overflow-y: auto;
  746. padding: 20px;
  747. height: calc(100vh - 342px); /* 减去标题和底部按钮的高度 */
  748. }
  749. // 新增底部按钮容器样式
  750. .add-yp-footer {
  751. display: flex;
  752. justify-content: center;
  753. padding: 20px 0;
  754. // 可选: 添加上边框
  755. border-top: 1px solid #EBEEF5;
  756. }
  757. .box-card-content2-list{
  758. margin-top: 20px;
  759. max-height: 300px;
  760. overflow-y: auto;
  761. .eg{
  762. color:rgba(37, 80, 162, 1);
  763. margin-right: 10px;
  764. }
  765. .box-card-content2-list-item{
  766. height: 80px;
  767. padding: 10px;
  768. border: 2px solid #EBEEF5;
  769. margin-bottom: 10px;
  770. }
  771. .box-card-content2-list-item-list{
  772. display: flex;
  773. margin-top: 20px;
  774. align-items: center;
  775. position: relative;
  776. .operation-icons {
  777. position: absolute;
  778. right: 10px;
  779. top: 10px;
  780. display: flex;
  781. gap: 10px;
  782. i {
  783. cursor: pointer;
  784. font-size: 16px;
  785. &.el-icon-edit {
  786. color: #409EFF;
  787. &:hover {
  788. color: #66b1ff;
  789. }
  790. }
  791. &.el-icon-delete {
  792. color: #F56C6C;
  793. &:hover {
  794. color: #f78989;
  795. }
  796. }
  797. }
  798. }
  799. .basic-info{
  800. color: gray;
  801. font-size: 14px;
  802. }
  803. .box-card-content2-list-item-list-basic{
  804. display: flex;
  805. margin-left: 10px;
  806. width: 100%;
  807. overflow-x: auto;
  808. flex: 1;
  809. .basic-item-info{
  810. margin-right: 10px;
  811. margin-right: 20px;
  812. flex-shrink: 0; // 防止项目被压缩
  813. }
  814. }
  815. }
  816. }
  817. </style>