ruleManage.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  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. :default-expanded-keys="defaultExpandedKeys"
  16. :current-node-key="curreenttid"
  17. highlight-current
  18. node-key="primaryKeyId"
  19. ref="tree"
  20. ></el-tree>
  21. </el-scrollbar>
  22. </div>
  23. </el-card>
  24. </div>
  25. </el-col>
  26. <template v-if="!isShowDetail">
  27. <el-col :span="18" class="h-100" v-if="isShowList">
  28. <div class="h-100 rule-box-all">
  29. <el-card class="box-card h-100">
  30. <div slot="header" class="clearfix">
  31. <el-link type="primary" @click="goBackFirst">
  32. <i class="el-icon-arrow-left" style="margin-right: 5px; "></i>
  33. <span>退出</span>
  34. </el-link>
  35. <div style="float: right;">
  36. <el-button
  37. :disabled="!treeId"
  38. icon="el-icon-plus"
  39. size="small"
  40. style="background-color:#2550A2;color:white;font-weight:bold;"
  41. plain
  42. @click="addRule"
  43. >新增
  44. </el-button>
  45. <el-button
  46. :disabled="!treeId"
  47. icon="el-icon-document-copy"
  48. size="small"
  49. style="background-color:#FFA042;color:white;font-weight:bold;"
  50. plain
  51. @click="manageFolder"
  52. >管理
  53. </el-button>
  54. </div>
  55. </div>
  56. <div v-if="ruleItemOptions.length>0">
  57. <div class="rule-box" v-loading="ruleLoading">
  58. <div class="rule-box-item" v-for="(item,index) in ruleItemOptions" :key="index" @click="ruleDetailClick(item)" >
  59. <div class="rule-box-item-icon">
  60. <i class="el-icon-folder" style=" cursor: pointer; font-size: 48px;color:orange"></i>
  61. </div>
  62. <div class="rule-box-item-title">{{ item.name }}</div>
  63. </div>
  64. </div>
  65. <el-pagination
  66. style="margin-top: 30px;text-align: center;"
  67. @size-change="handleSizeChange"
  68. @current-change="handleCurrentChange"
  69. :current-page="currentPage"
  70. :page-size="pageSize"
  71. :total="ruleItemOptions.length"
  72. layout="prev, pager, next"
  73. class="pagination"
  74. >
  75. </el-pagination>
  76. </div>
  77. <el-empty description="暂无数据" v-else class="empty-container"></el-empty>
  78. </el-card>
  79. </div>
  80. </el-col>
  81. <el-col :span="18" class="h-100" v-if="!isShowList">
  82. <div class="h-100 rule-box-all">
  83. <el-card class="box-card h-100">
  84. <div slot="header" class="clearfix">
  85. <el-link type="primary" @click="goBack">
  86. <i class="el-icon-arrow-left" style="margin-right: 5px;"></i>
  87. <span >返回上一级</span>
  88. </el-link>
  89. <div style="float: right;">
  90. <el-button
  91. icon="el-icon-plus"
  92. size="small"
  93. style="background-color:#2550A2;color:white;font-weight:bold;"
  94. plain
  95. @click="addFile"
  96. >新增
  97. </el-button>
  98. <el-button
  99. icon="el-icon-document-copy"
  100. size="small"
  101. style="background-color:#FFA042;color:white;font-weight:bold;"
  102. plain
  103. @click="manageFolder"
  104. >管理
  105. </el-button>
  106. </div>
  107. </div>
  108. <div class="rule-box" v-loading="ruleItemOptionsDetailLoading" v-if="ruleItemOptionsDetail.length>0">
  109. <div class="rule-box-item" v-for="item in ruleItemOptionsDetail" :key="item.id" @click="ruleDetailClick1(item)">
  110. <div class="rule-box-item-icon">
  111. <i class="el-icon-tickets" style=" cursor: pointer; font-size: 48px;color:#2550A2"></i>
  112. </div>
  113. <div class="rule-box-item-title">{{ item.name }}</div>
  114. </div>
  115. </div>
  116. <el-empty description="暂无数据" v-else class="empty-container"></el-empty>
  117. <el-pagination
  118. style="margin-top: 30px;text-align: center;"
  119. @size-change="handleSizeChange1"
  120. @current-change="handleCurrentChange1"
  121. :current-page="currentPage1"
  122. :page-size="pageSize1"
  123. :total="total"
  124. layout="prev, pager, next"
  125. class="pagination"
  126. >
  127. </el-pagination>
  128. </el-card>
  129. </div>
  130. </el-col>
  131. </template>
  132. <el-col :span="18" class="h-100" v-if="isShowDetail">
  133. <el-card class="box-card h-100" v-if="isShowYpList">
  134. <div slot="header" class="clearfix">
  135. <el-link type="primary" @click="goBack1">
  136. <i class="el-icon-arrow-left" style="margin-right: 5px;"></i>
  137. <span >返回上一级</span>
  138. </el-link>
  139. </div>
  140. <div class="box-card-title">
  141. {{ ruleDataDetail.name }}
  142. </div>
  143. <div class="box-card-content1">
  144. <div class="box-card-content1-left">
  145. <div class="box-card-content1-left-item">
  146. 下达日期:{{ ruleDataDetail.issueDate }}
  147. </div>
  148. <div class="box-card-content1-left-item">
  149. 实施日期:{{ ruleDataDetail.actualizeDate }}
  150. </div>
  151. <div>
  152. <i class="el-icon-document"></i>
  153. <el-link v-for="item in ruleDataDetail.standardFiles" :key="item.id" type="primary" :href="item.standardFileUrl" style="margin-right: 5px;">{{ item.fileName }}</el-link>
  154. </div>
  155. </div>
  156. <div class="box-card-content1-right">
  157. <el-button type="danger" size="small" @click="previewRes">效果预览</el-button>
  158. <el-button type="warning" size="small" @click="refreshRule">规范更新</el-button>
  159. </div>
  160. </div>
  161. <div class="box-card-content2">
  162. <div class="box-card-content2-top">
  163. <div class="box-card-content2-title">
  164. <div class="title-container">
  165. <span>样品信息</span>
  166. <i class="el-icon-circle-plus" @click="addYp"></i>
  167. </div>
  168. </div>
  169. <div class="box-card-content2-list">
  170. <div class="box-card-content2-list-item" v-for="(item, index) in ypList" :key="index">
  171. <div class="box-card-content2-list-item-title">
  172. <span class="eg">if()</span>
  173. <span>{{ item.name }}</span>
  174. </div>
  175. <div class="box-card-content2-list-item-list">
  176. <span class="basic-info">基础信息</span>
  177. <div class="box-card-content2-list-item-list-basic">
  178. <div class="basic-item-info" v-for="(item1,index1) in item.info":key="index1" >
  179. {{ item1.name }}
  180. </div>
  181. <div class="operation-icons">
  182. <i class="el-icon-edit" @click.stop="handleEdit(item, index)"></i>
  183. <i class="el-icon-delete" @click.stop="handleDelete(item,index)"></i>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="box-card-content2-top">
  191. <div class="box-card-content2-title">
  192. <div class="title-container">
  193. <span>技术指标</span>
  194. <i class="el-icon-circle-plus" @click="addJs"></i>
  195. </div>
  196. </div>
  197. <div class="box-card-content2-list">
  198. <div class="box-card-content2-list-item" v-for="(item, index) in jsList" :key="index">
  199. <div class="box-card-content2-list-item-title">
  200. <span class="eg">else()</span>
  201. <span>{{ item.name }}</span>
  202. </div>
  203. <div class="box-card-content2-list-item-list">
  204. <span class="basic-info">内容</span>
  205. <div class="box-card-content2-list-item-list-basic">
  206. <div class="basic-item-info" v-for="(item1,index1) in item.info":key="index1" >
  207. {{ item1.symbolName }}
  208. </div>
  209. <div class="operation-icons">
  210. <i class="el-icon-edit" @click.stop="handleEditJs1(item, index)"></i>
  211. <i class="el-icon-delete" @click.stop="handleDelete1(item,index)"></i>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </el-card>
  220. <el-card class="box-card h-100" v-if="!isShowYpList&&!isShowJsList">
  221. <template >
  222. <div slot="header" class="clearfix" >
  223. <el-link type="primary" @click="showYpList">
  224. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" ></i>
  225. <span >退出</span>
  226. </el-link>
  227. </div>
  228. <div class="add-yp-title">
  229. <span>{{ isEditYp?'编辑':'新增' }}</span>
  230. </div>
  231. <div class="add-yp-detail">
  232. <el-form label-position="left" label-width="80px" :model="ypDetail" :rules="ypRuleForm" ref="ypFormRef">
  233. <el-form-item label="样品信息" prop="name">
  234. <el-input v-model="ypDetail.name"></el-input>
  235. </el-form-item>
  236. <el-form-item label="基础信息">
  237. <div class="input-with-icon" v-for="(item, index) in ypDetail.info" :key="index">
  238. <el-input v-model="item.name"></el-input>
  239. <i class="el-icon-circle-plus-outline" @click="addBasicInfo(index)" ></i>
  240. <i class="el-icon-remove-outline" @click="removeBasicInfo(item,index)" v-if="index!==0"></i>
  241. </div>
  242. </el-form-item>
  243. </el-form>
  244. </div>
  245. <div class="add-yp-footer">
  246. <el-button type="primary" @click="saveYpForm" :loading="saveYpLoad">保存</el-button>
  247. </div>
  248. </template>
  249. </el-card>
  250. <el-card v-if="isShowJsList&&!isShowYpList">
  251. <div slot="header" class="clearfix" >
  252. <el-link type="primary" @click="showYpList">
  253. <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" ></i>
  254. <span >退出</span>
  255. </el-link>
  256. </div>
  257. <div class="add-yp-title">
  258. <span>{{ isEditJs?'编辑':'新增' }}</span>
  259. <div v-if="isEditJs">
  260. <el-button size="small" style="background: rgb(168, 86, 248);color: white;" icon="el-icon-office-building" @click="conditionsSet">条件设置</el-button>
  261. <el-button size="small" style="background:rgb(37, 80, 162);;color: white;" icon="el-icon-connection" @click="linkEle">关联元素</el-button>
  262. </div>
  263. </div>
  264. <div class="add-yp-detail">
  265. <el-form label-position="left" label-width="80px" :model="jsDetail" :rules="jsRuleForm" ref="jsFormRef">
  266. <el-form-item label="检测项" prop="name">
  267. <el-input v-model="jsDetail.name"></el-input>
  268. </el-form-item>
  269. <el-form-item label="技术指标">
  270. <div class="input-with-icon" v-for="(item, index) in jsDetail.info" :key="index">
  271. <el-input placeholder="请输入内容" v-model="item.name" class="input-with-select">
  272. <el-select v-model="item.symbol" slot="prepend" placeholder="请选择符号" style="width: 150px;">
  273. <el-option v-for="(item1,index) in fqOptions" :key="index" :label="item1.dictKey" :value="item1.dictKey"></el-option>
  274. </el-select>
  275. </el-input>
  276. <i class="el-icon-circle-plus-outline" @click="addBasicInfo1(index)" ></i>
  277. <i class="el-icon-remove-outline" @click="removeBasicInfo1(item,index)" v-if="index!==0"></i>
  278. </div>
  279. </el-form-item>
  280. </el-form>
  281. </div>
  282. <div class="add-yp-footer">
  283. <el-button type="primary" @click="addJsForm" :loading="addJsFormLoad">保存</el-button>
  284. </div>
  285. </el-card>
  286. </el-col>
  287. </el-row>
  288. <!-- 新增文件夹 -->
  289. <el-dialog
  290. title="新增"
  291. :visible.sync="addDialogVisible"
  292. width="30%"
  293. append-to-body
  294. >
  295. <div class="input-container">
  296. <span>规范文件夹名称</span>
  297. <el-input v-model="titleInput" placeholder="请输入内容" style="width: 300px;"></el-input>
  298. </div>
  299. <span slot="footer" class="dialog-footer">
  300. <el-button @click="addDialogVisible = false">取 消</el-button>
  301. <el-button type="primary" @click="addSaveFileClick" :loading="addSaveFileLoad">确 定</el-button>
  302. </span>
  303. </el-dialog>
  304. <!-- 管理规范 -->
  305. <el-dialog title="管理" :visible.sync="manageVisible" width="50%" append-to-body>
  306. <el-table :data="manageData" border height="550">
  307. <el-table-column property="name" label="规范名称" >
  308. <template slot-scope="scope">
  309. <el-input v-model="scope.row.name" placeholder="请输入内容"></el-input>
  310. </template>
  311. </el-table-column>
  312. <el-table-column property="name" label="文件名称" v-if="!isShowList" >
  313. <template slot-scope="scope">
  314. <el-input v-model="scope.row.standardFile.fileName" placeholder="请输入内容"></el-input>
  315. <el-button
  316. type="text"
  317. size="small"
  318. style="color: rgb(219, 55, 55);"
  319. @click="delFile(scope.row,scope.$index )"
  320. >
  321. <i class="el-icon-delete"></i> 删除
  322. </el-button>
  323. </template>
  324. </el-table-column>
  325. <el-table-column label="操作" width="200">
  326. <template slot-scope="scope">
  327. <el-upload
  328. v-if="!isShowList"
  329. class="upload-demo"
  330. action="#"
  331. :on-change="file => handleFileUpload(file, scope.row, scope.$index)"
  332. :before-upload="beforeUpload"
  333. :show-file-list="false"
  334. :auto-upload="false"
  335. >
  336. <el-button size="small" type="text">文件上传</el-button>
  337. </el-upload>
  338. <el-button type="text" size="small" style="color: rgb(219, 55, 55);" @click="delManange(scope.$index,scope.row)">删除</el-button>
  339. </template>
  340. </el-table-column>
  341. </el-table>
  342. <div slot="footer" class="dialog-footer">
  343. <el-button @click="manageVisible = false">取 消</el-button>
  344. <el-button type="primary" @click="manageSave" :loading="manageLoad">确 定</el-button>
  345. </div>
  346. </el-dialog>
  347. <!-- 新增规范文件 -->
  348. <el-dialog title="新增" :visible.sync="addFileDialogVisible" append-to-body width="30%">
  349. <el-form :model="fileForm" label-position="left" label-width="80px" :rules="fileRuleForm" ref="fileFormRef">
  350. <el-form-item label="规范名称" prop="name" >
  351. <el-input v-model="fileForm.name" ></el-input>
  352. </el-form-item>
  353. <el-form-item label="下达日期" >
  354. <el-date-picker
  355. style="width: 100%;"
  356. format="yyyy 年 MM 月 dd 日"
  357. value-format="yyyy-MM-dd"
  358. v-model="fileForm.issueDate"
  359. type="date"
  360. placeholder="选择日期">
  361. </el-date-picker>
  362. </el-form-item>
  363. <el-form-item label="实施日期" >
  364. <el-date-picker
  365. format="yyyy 年 MM 月 dd 日"
  366. value-format="yyyy-MM-dd"
  367. style="width: 100%;"
  368. v-model="fileForm.actualizeDate"
  369. type="date"
  370. placeholder="选择日期">
  371. </el-date-picker>
  372. </el-form-item>
  373. <el-form-item label="规范文件" >
  374. <el-upload
  375. :auto-upload="false"
  376. multiple
  377. class="upload-demo"
  378. action="#"
  379. :file-list="fileForm.standardFileUrl"
  380. :on-change="uploadImportData"
  381. >
  382. <el-button size="small" type="primary">点击上传</el-button>
  383. <div slot="tip" class="el-upload__tip">允许文件格式.pdf</div>
  384. </el-upload>
  385. </el-form-item>
  386. </el-form>
  387. <div slot="footer" class="dialog-footer">
  388. <el-button @click="addFileDialogVisible = false">取 消</el-button>
  389. <el-button type="primary" @click="addFileRoleForm" :loading="addFileRuleLoad">确 定</el-button>
  390. </div>
  391. </el-dialog>
  392. <!-- 条件设置 -->
  393. <ConditionsSet ref="conditionsSetRef" @confirm="handleConditionsConfirm" />
  394. <!-- 关联元素 -->
  395. <LinkEle ref="linkEleRef" @confirm="confirmLinkEle" />
  396. <!-- 效果预览 -->
  397. <PreviewResult ref="previewResultRef" :ypList="ypList"/>
  398. </div>
  399. </template>
  400. <script>
  401. import {getLazytree} from "@/api/manager/wbsprivate";
  402. import ConditionsSet from './ConditionsSet.vue'
  403. import LinkEle from "./LinkEle.vue";
  404. import PreviewResult from './PreviewResult.vue'
  405. import {getPage,edit,add,deleteItem,getById, addInfo,editInfo,getInfoPage,deleteItemInfo,updateTypeByTwo } from "@/api/ruleManage/fileRule.js";
  406. import { getStore, setStore } from "@/util/store";
  407. import { getDictionary } from "@/api/system/dict";
  408. export default {
  409. components: {
  410. ConditionsSet,
  411. LinkEle,
  412. PreviewResult
  413. },
  414. data() {
  415. return {
  416. id: '',
  417. parentId: '',
  418. tenant_id:'',
  419. projectid:'',
  420. treeId: '',
  421. defaultProps: {
  422. children: "children",
  423. label: "title",
  424. isLeaf: function (data) {
  425. return !data.hasChildren || (data.isExistForm==1);
  426. },
  427. },
  428. defaultExpandedKeys: [],
  429. curreenttid: '',
  430. expandName: this.$route.fullPath,
  431. ruleItemOptions:[
  432. ],
  433. total: 0,
  434. ruleLoading: false,
  435. addDialogVisible:false,
  436. addSaveFileLoad:false,
  437. titleInput:'',
  438. isShowList:true,
  439. ruleItemOptionsDetail:[],
  440. ruleItemOptionsDetailLoading: false,
  441. currentPage: 1,
  442. pageSize: 40, // 8列 * 5行 = 40
  443. currentPage1: 1,
  444. ruleItem: {},
  445. ruleItemDetail: {},
  446. pageSize1: 40, // 8列 * 5行 = 40
  447. isShowYpList:true,
  448. isShowDetail:false,
  449. ruleDataDetail: {},
  450. ypDetail: {
  451. name: '',
  452. info: [{ name: '' }]
  453. },
  454. saveYpLoad: false,
  455. ypRuleForm: {
  456. name: [
  457. { required: true, message: '请输入样品名称', trigger: 'blur' }
  458. ],
  459. },
  460. manageVisible: false,
  461. manageData: [],
  462. manageLoad: false,
  463. addFileDialogVisible:false,
  464. addFileRuleLoad:false,
  465. fileForm:{
  466. standardFileUrl: [], // 用于展示的文件列表
  467. files: [] // 存储实际的文件对象
  468. },
  469. fileRuleForm:{
  470. name: [
  471. { required: true, message: '请输入规范名称', trigger: 'blur' }
  472. ],
  473. },
  474. ypList:[
  475. {id:1,name:'样品名称',
  476. info:
  477. [{}]
  478. },
  479. ],
  480. jsList:[
  481. {id:1,name:'技术指标名称',
  482. info:
  483. []
  484. },
  485. ],
  486. isShowJsList:false,
  487. isEditYp: false,
  488. isEditJs: false,
  489. jsDetail: {
  490. name: '',
  491. info: [{ name: '',symbol:'' }, ]
  492. },
  493. addJsFormLoad: false,
  494. jsRuleForm: {
  495. name: [
  496. { required: true, message: '请输入技术指标名称', trigger: 'blur' }
  497. ],
  498. },
  499. fqOptions: [
  500. ],
  501. conditionsSetVisible:false,//条件设置弹窗是否显示
  502. isUploadVisible:false,//上传文件弹窗是否显示
  503. delIds:[],
  504. delFileIds:[]
  505. };
  506. },
  507. created(){
  508. this.getFqOptions()
  509. const { id, tenant_id,projectid} = this.$route.query;
  510. this.id = id;
  511. this.parentId = 0;
  512. this.tenant_id = tenant_id;
  513. this.projectid = projectid;
  514. this.defaultExpandedKeys = getStore({ name: this.expandName });
  515. this.curreenttid= getStore({ name:'curreenttid' });
  516. if (this.curreenttid) {
  517. this.treeId = this.curreenttid;
  518. this.getRuleItemOptions();
  519. }
  520. },
  521. methods: {
  522. //获取符号字典
  523. getFqOptions(){
  524. getDictionary({
  525. code: "u_standard_symbol",
  526. }).then((res) => {
  527. this.fqOptions = res.data.data;
  528. });
  529. },
  530. //获取规范文件夹数据
  531. getRuleItemOptions() {
  532. this.ruleLoading = true;
  533. getPage({
  534. privateId:this.treeId,
  535. current:this.currentPage,
  536. size:this.pageSize,
  537. type: 1,
  538. }).then((res) => {
  539. this.ruleLoading = false;
  540. if (res.data.code === 200) {
  541. this.ruleItemOptions = res.data.data.records;
  542. this.total = res.data.data.total;
  543. } else {
  544. this.ruleItemOptions=[]
  545. this.$message.error(res.data.msg);
  546. }
  547. });
  548. },
  549. handleNodeClick(data,node) {
  550. this.treeId = data.primaryKeyId;
  551. this.getRuleItemOptions()
  552. //获取节点展开路径
  553. this.getExpandedKeys(node);
  554. setStore({
  555. name: 'curreenttid',
  556. content: data.primaryKeyId,
  557. type: true, //sessionStorage
  558. });
  559. this.isShowList = true;
  560. this.isShowDetail=false
  561. },
  562. getExpandedKeys(node) {
  563. let expandedKeys = [];
  564. while (node.parent) {
  565. expandedKeys.push(node.data.primaryKeyId);
  566. node = node.parent;
  567. }
  568. setStore({
  569. name: this.expandName,
  570. content: expandedKeys,
  571. type: true,
  572. });
  573. },
  574. loadNode(node, resolve) {
  575. let pid = 0;
  576. if (node.level != 0) {
  577. pid = node.data.id;
  578. }
  579. getLazytree(this.id, pid, this.tenant_id, this.projectid, {
  580. wbsType: 2,
  581. }).then((res) => {
  582. let arr = [];
  583. if (Array.isArray(res.data.data)) {
  584. arr = res.data.data;
  585. }
  586. return resolve(arr);
  587. });
  588. },
  589. goBackFirst() {
  590. this.isShowList = true;
  591. this.$router.go(-1);
  592. },
  593. goBack() {
  594. this.isShowList = true;
  595. },
  596. goBack1() {
  597. this.isShowDetail = false;
  598. },
  599. addRule(){
  600. this.titleInput = '';
  601. this.manageLoad=false
  602. this.addDialogVisible = true;
  603. },
  604. addSaveFileClick() {
  605. this.addSaveFileLoad = true;
  606. if (!this.titleInput) {
  607. this.$message.error('请输入规范文件夹名称');
  608. this.addSaveFileLoad = false;
  609. return;
  610. }
  611. const formData = new FormData();
  612. // 添加基本信息
  613. let objData={
  614. name: this.titleInput,
  615. type:1,
  616. privateId: this.treeId,
  617. }
  618. formData.append('data', new Blob([JSON.stringify(objData)], {
  619. type: 'application/json'
  620. }));
  621. add(
  622. formData
  623. ).then((res) => {
  624. this.addSaveFileLoad = false;
  625. if(res.data.code==200){
  626. this.$message.success(res.data.msg)
  627. this.addDialogVisible=false
  628. this.getRuleItemOptions();
  629. }else{
  630. this.$message.error(res.data.msg)
  631. }
  632. }).finally(() => {
  633. this.saveBatchLoading = false;
  634. });
  635. },
  636. ruleDetailClick(item){
  637. this.isShowList = false;
  638. this.getRuleDetail(item);
  639. this.ruleItem=item
  640. },
  641. //点击规范文件夹详情
  642. getRuleDetail(item) {
  643. this.ruleItemOptionsDetailLoading = true;
  644. getPage({
  645. current: this.currentPage1,
  646. size: this.pageSize1,
  647. type: 2,
  648. parentId: item.id,
  649. privateId: this.treeId,
  650. }).then((res) => {
  651. this.ruleItemOptionsDetailLoading = false;
  652. if (res.data.code === 200) {
  653. this.ruleItemOptionsDetail = res.data.data.records;
  654. } else {
  655. this.$message.error(res.msg);
  656. }
  657. });
  658. },
  659. //
  660. ruleDetailClick1(item){
  661. this.getRuleDataDetail(item);
  662. this.getRuleDataDetail1(item);
  663. this.ruleItemDetail=item
  664. this.isShowDetail = true;
  665. },
  666. //获取规范数据详情
  667. getRuleDataDetail(item){
  668. getById({
  669. id: item.id,
  670. }).then((res) => {
  671. if (res.data.code === 200) {
  672. this.ruleDataDetail = res.data.data;
  673. console.log( this.ruleDataDetail,' this.ruleDataDetail');
  674. } else {
  675. this.$message.error(res.data.msg);
  676. }
  677. });
  678. },
  679. //获取规范数据详情
  680. getRuleDataDetail1(item,type){
  681. getInfoPage({
  682. current:1,
  683. size:100,
  684. type,
  685. standardId: item.id,
  686. }).then((res) => {
  687. this.ruleLoading = false;
  688. if (res.data.code === 200) {
  689. //
  690. if(type===1){
  691. this.ypList = res.data.data.records;
  692. }else if(type===2){
  693. this.jsList = res.data.data.records;
  694. }else{
  695. const records = res.data.data.records;
  696. // 根据 type 分类数据
  697. this.ypList = records.filter(record => record.type === 1);
  698. this.jsList = records.filter(record => record.type === 2);
  699. }
  700. } else {
  701. this.ypList = [];
  702. this.jsList = [];
  703. this.$message.error(res.data.msg);
  704. }
  705. });
  706. },
  707. addFile(){
  708. //新增规范文件
  709. this.addFileDialogVisible = true;
  710. },
  711. uploadImportData(file) {
  712. // 验证文件类型
  713. // 将文件对象存入 files 数组
  714. if (!this.fileForm.files) {
  715. this.fileForm.files = [];
  716. }
  717. this.fileForm.files.push(file.raw);
  718. // 更新显示的文件列表
  719. this.fileForm.standardFileUrl = this.fileForm.files.map(file => ({
  720. name: file.name,
  721. }));
  722. },
  723. async addFileRoleForm(){
  724. const isValid = await this.$refs.fileFormRef.validate()
  725. if (!isValid) {
  726. this.$message.error('请填写完整的规范信息');
  727. return;
  728. }
  729. const formData = new FormData();
  730. // 添加基本信息
  731. let objData={
  732. name: this.fileForm.name,
  733. issueDate: this.fileForm.issueDate,
  734. actualizeDate: this.fileForm.actualizeDate,
  735. type: 2,
  736. privateId: this.treeId,
  737. parentId: this.ruleItem.id,
  738. }
  739. let data = JSON.stringify(objData);
  740. formData.append('data', new Blob([JSON.stringify(objData)], {
  741. type: 'application/json'
  742. }));
  743. // 添加文件
  744. if (this.fileForm.files && this.fileForm.files.length > 0) {
  745. this.fileForm.files.forEach(file => {
  746. formData.append('files', file);
  747. });
  748. }
  749. // add({
  750. // ...this.fileForm,
  751. // type: 2,
  752. // privateId: this.treeId,
  753. // parentId: this.ruleItem.id,
  754. // })
  755. console.log(formData,'formData');
  756. add(formData)
  757. .then((res) => {
  758. if(res.data.code==200){
  759. this.$message.success(res.data.msg)
  760. this.addFileDialogVisible=false
  761. this.getRuleDetail(this.ruleItem);
  762. }else{
  763. this.$message.error(res.data.msg)
  764. }
  765. }).finally(() => {
  766. this.saveBatchLoading = false;
  767. });
  768. },
  769. handleCurrentChange(val) {
  770. this.currentPage = val
  771. this.getRuleItemOptions(); // 刷新数据
  772. },
  773. handleSizeChange(val) {
  774. this.pageSize = val
  775. this.currentPage = 1
  776. this.getRuleItemOptions(); // 刷新数据
  777. },
  778. handleCurrentChange1(val) {
  779. this.currentPage = val
  780. this.getRuleDetail(item);
  781. },
  782. handleSizeChange1(val) {
  783. this.pageSize1 = val
  784. this.currentPage1= 1
  785. this.getRuleDetail(this.ruleItem); // 刷新数据
  786. },
  787. addYp(){
  788. this.isShowYpList = false;
  789. this.isShowJsList = false;
  790. this.isEditYp = false;
  791. this.ypDetail = {
  792. name: '',
  793. info: [{ name: '' }]
  794. };
  795. },
  796. showYpList() {
  797. this.isShowYpList = true;
  798. },
  799. // 添加基础信息行
  800. addBasicInfo(index) {
  801. this.ypDetail.info.splice(index + 1, 0, { name: '' });
  802. },
  803. // 删除基础信息行
  804. removeBasicInfo(item,index) {
  805. if(item.id==''){
  806. this.ypDetail.info.splice(index, 1);
  807. }else{
  808. this.$confirm('删除后,数据将无法恢复,是否确认删除!', '提示', {
  809. confirmButtonText: '确定',
  810. cancelButtonText: '取消',
  811. type: 'warning'
  812. }).then(() => {
  813. deleteItemInfo({id:item.id}).then((res) => {
  814. if(res.data.code==200){
  815. this.$message.success(res.data.msg);
  816. this.getRuleDataDetail(this.ruleItemDetail);
  817. this.getRuleDataDetail1(this.ruleItemDetail,1);
  818. this.ypDetail.info.splice(index, 1);
  819. }else{
  820. this.$message.error(res.data.msg);
  821. }
  822. });
  823. }).catch(() => {
  824. this.$message.info('已取消删除');
  825. })
  826. }
  827. },
  828. async saveYpForm(){
  829. const isValid = await this.$refs.ypFormRef.validate()
  830. if (!isValid) {
  831. this.$message.error('请填写完整的样品信息');
  832. return;
  833. }
  834. this.saveYpLoad = true;
  835. this.ypDetail.info.forEach((item)=>{
  836. item.type=1
  837. })
  838. if(!this.isEditYp){
  839. addInfo({
  840. ...this.ypDetail,
  841. type: 1,
  842. standardId: this.ruleItemDetail.id,
  843. // parentId: this.ruleItemDetail.id,
  844. }).then((res) => {
  845. if(res.data.code==200){
  846. this.$message.success(res.data.msg)
  847. this.getRuleDataDetail(this.ruleItemDetail);
  848. this.getRuleDataDetail1(this.ruleItemDetail,1);
  849. this.isShowYpList= true;
  850. this.isShowJsList=true
  851. }else{
  852. this.$message.error(res.data.msg)
  853. }
  854. }).finally(() => {
  855. this.saveYpLoad = false;
  856. });
  857. }else{
  858. editInfo({
  859. ...this.ypDetail,
  860. type: 1,
  861. standardId: this.ruleItemDetail.id,
  862. // parentId: this.ruleItemDetail.id,
  863. }).then((res) => {
  864. if(res.data.code==200){
  865. this.$message.success(res.data.msg)
  866. this.getRuleDataDetail(this.ruleItemDetail);
  867. this.getRuleDataDetail1(this.ruleItemDetail,1);
  868. this.isShowYpList= true;
  869. this.isShowJsList=true
  870. }else{
  871. this.$message.error(res.data.msg)
  872. }
  873. }).finally(() => {
  874. this.saveYpLoad = false;
  875. });
  876. }
  877. },
  878. // 管理文件夹
  879. manageFolder(){
  880. this.delFileIds=[];
  881. this.delIds=[];
  882. this.manageVisible = true;
  883. if(!this.isShowList){
  884. this.manageData=JSON.parse(JSON.stringify(this.ruleItemOptionsDetail));
  885. this.manageData.forEach(item=>{
  886. item.filesCount=0;
  887. })
  888. }else{
  889. this.manageData=JSON.parse(JSON.stringify(this.ruleItemOptions));
  890. }
  891. },
  892. delManange(index,row){
  893. console.log(this.isShowList,'isShowList');
  894. if(this.isShowList){
  895. this.$confirm('删除后,数据将无法恢复,是否确认删除!', '提示', {
  896. confirmButtonText: '确定',
  897. cancelButtonText: '取消',
  898. type: 'warning'
  899. }).then(() => {
  900. // this.manageData.splice(index, 1);
  901. deleteItem({id:row.id}).then((res) => {
  902. if(res.data.code==200){
  903. this.$message.success(res.data.msg);
  904. this.getRuleItemOptions();
  905. this.manageData.splice(index, 1);
  906. }else{
  907. this.$message.error(res.data.msg);
  908. }
  909. });
  910. }).catch(() => {
  911. this.$message.info('已取消删除');
  912. })
  913. }else{
  914. //记录每次删除文件的id,记录到数组里面
  915. this.delIds.push(row.id)
  916. this.manageData.splice(index, 1);
  917. row.filesCount = 0; // 设置文件大小
  918. }
  919. },
  920. putFile(item,index){
  921. this.isUploadVisible = true;
  922. },
  923. handleFileUpload(file,row,index) {
  924. if(!file) return
  925. row.file=file.raw; // 获取原始文件对象
  926. row.standardFile.fileName = file.name; // 设置文件名
  927. row.filesCount = 1; // 设置文件大小
  928. // 在这里处理文件上传逻辑
  929. },
  930. delFile(row,id){
  931. console.log(row,'row');
  932. const {standardFile}=row;
  933. console.log(standardFile,'standardFile');
  934. if(standardFile&&standardFile.id){
  935. this.delFileIds.push(standardFile.id)
  936. }
  937. row.filesCount = 0; // 设置文件大小
  938. row.file=null; // 获取原始文件对象
  939. row.standardFile.fileName = ''; // 设置文件名
  940. // 如果有文件ID,则执行删除操作
  941. },
  942. manageSave(){
  943. this.manageLoad = true;
  944. const arr = this.manageData.map(item => ({ id: item.id, name: item.name,type:this.isShowList?1:2 }));
  945. console.log(arr,'arr');
  946. if(this.isShowList){
  947. edit(arr ).then((res) => {
  948. if (res.data.code === 200) {
  949. this.$message.success(res.data.msg);
  950. this.manageVisible = false;
  951. if(!this.isShowList){
  952. this.getRuleDetail(this.ruleItem);
  953. this.manageData = JSON.parse(JSON.stringify(this.ruleItemOptionsDetail));
  954. }else{
  955. this.getRuleItemOptions();
  956. this.manageData = JSON.parse(JSON.stringify(this.ruleItemOptions));
  957. }
  958. } else {
  959. this.$message.error(res.data.msg);
  960. }
  961. }).finally(() => {
  962. this.manageLoad = false;
  963. });
  964. }else{
  965. let objData=this.manageData.map(item => ({ id: item.id, name: item.name,filesCount: item.filesCount,file:item.file }));
  966. let filesArr=this.manageData.map(item => item.file);
  967. const formData = new FormData();
  968. console.log(objData,'objData');
  969. let objData1=this.manageData.map(item => ({ id: item.id, name: item.name,filesCount: item.filesCount}));
  970. formData.append('data', new Blob([JSON.stringify(objData1)], {
  971. type: 'application/json'
  972. }))
  973. let ids=this.delIds
  974. formData.append('delIds', new Blob([JSON.stringify(ids)], {
  975. type: 'application/json'
  976. }))
  977. let delFileIds=this.delFileIds;
  978. formData.append('delFileIds', new Blob([JSON.stringify(delFileIds)], {
  979. type: 'application/json'
  980. }))
  981. console.log(filesArr,'filesArr');
  982. if(filesArr.length>0){
  983. for(let i=0;i<filesArr.length;i++){
  984. formData.append('files', filesArr[i]);
  985. }
  986. }
  987. console.log(formData,'formData');
  988. console.log(this.delFileIds,'this.delFileIds;');
  989. console.log(this.delIds,'this.delIds;');
  990. updateTypeByTwo(formData ).then((res) => {
  991. if (res.data.code === 200) {
  992. this.$message.success(res.data.msg);
  993. this.manageVisible = false;
  994. if(!this.isShowList){
  995. this.getRuleDetail(this.ruleItem);
  996. this.manageData = JSON.parse(JSON.stringify(this.ruleItemOptionsDetail));
  997. }else{
  998. this.getRuleItemOptions();
  999. this.manageData = JSON.parse(JSON.stringify(this.ruleItemOptions));
  1000. }
  1001. } else {
  1002. this.$message.error(res.data.msg);
  1003. }
  1004. }).finally(() => {
  1005. this.manageLoad = false;
  1006. });
  1007. }
  1008. },
  1009. handleEdit(item, index) {
  1010. this.isShowYpList = false;
  1011. this.isShowJsList = false;
  1012. this.ypDetail = JSON.parse(JSON.stringify(item));
  1013. this.isEditYp = true;
  1014. },
  1015. handleDelete(item,index) {
  1016. this.$confirm('删除后,数据无法恢复,是否确认删除?', '删除确认', {
  1017. confirmButtonText: '确定',
  1018. cancelButtonText: '取消',
  1019. type: 'warning'
  1020. }).then(() => {
  1021. // this.ypList.splice(index, 1);
  1022. deleteItemInfo({ id: item.id }).then((res) => {
  1023. if(res.data.code==200){
  1024. this.$message.success(res.data.msg)
  1025. this.getRuleDataDetail(this.ruleItemDetail);
  1026. this.getRuleDataDetail1(this.ruleItemDetail,1);
  1027. }else{
  1028. this.$message.error(res.data.msg)
  1029. }
  1030. });
  1031. }).catch(() => {});
  1032. },
  1033. handleDelete1(item,index) {
  1034. this.$confirm('删除后,数据无法恢复,是否确认删除?', '删除确认', {
  1035. confirmButtonText: '确定',
  1036. cancelButtonText: '取消',
  1037. type: 'warning'
  1038. }).then(() => {
  1039. // this.jsList.splice(index, 1);
  1040. deleteItemInfo({ id: item.id }).then((res) => {
  1041. if(res.data.code==200){
  1042. this.$message.success(res.data.msg)
  1043. this.getRuleDataDetail(this.ruleItemDetail);
  1044. this.getRuleDataDetail1(this.ruleItemDetail,2);
  1045. }else{
  1046. this.$message.error(res.data.msg)
  1047. }
  1048. });
  1049. }).catch(() => {});
  1050. },
  1051. //新增技术指标
  1052. addJs(){
  1053. this.isShowJsList = true;
  1054. this.isShowYpList = false;
  1055. this.isEditJs = false;
  1056. this.jsDetail = {
  1057. name: '',
  1058. info: [{ name: '',select:'' }]
  1059. };
  1060. },
  1061. handleEditJs1(item, index) {
  1062. // 处理编辑逻辑
  1063. this.jsDetail = JSON.parse(JSON.stringify(item));
  1064. this.isEditJs = true;
  1065. this.isShowJsList = true;
  1066. this.isShowYpList = false;
  1067. },
  1068. addBasicInfo1(index) {
  1069. this.jsDetail.info.splice(index + 1, 0, { name: '', select: '' });
  1070. },
  1071. addJsForm() {
  1072. const isValid = this.$refs.jsFormRef.validate();
  1073. if (!isValid) {
  1074. this.$message.error('请填写完整的技术指标信息');
  1075. return;
  1076. }
  1077. this.addJsFormLoad = true;
  1078. this.jsDetail.info.forEach((item)=>{
  1079. item.type=2
  1080. })
  1081. if(!this.isEditJs){
  1082. addInfo({
  1083. ...this.jsDetail,
  1084. type: 2,
  1085. standardId: this.ruleItemDetail.id,
  1086. }).then((res) => {
  1087. if(res.data.code==200){
  1088. this.$message.success(res.data.msg)
  1089. this.getRuleDataDetail(this.ruleItemDetail);
  1090. this.getRuleDataDetail1(this.ruleItemDetail,2);
  1091. this.isShowYpList= true;
  1092. this.isShowJsList=false
  1093. }else{
  1094. this.$message.error(res.data.msg)
  1095. }
  1096. }).finally(() => {
  1097. this.addJsFormLoad = false;
  1098. });
  1099. }else{
  1100. editInfo({
  1101. ...this.jsDetail,
  1102. type: 2,
  1103. standardId: this.ruleItemDetail.id,
  1104. }).then((res) => {
  1105. if(res.data.code==200){
  1106. this.$message.success(res.data.msg)
  1107. this.getRuleDataDetail(this.ruleItemDetail);
  1108. this.getRuleDataDetail1(this.ruleItemDetail,2);
  1109. this.isShowYpList= true;
  1110. this.isShowJsList=false
  1111. }else{
  1112. this.$message.error(res.data.msg)
  1113. }
  1114. }).finally(() => {
  1115. this.addJsFormLoad = false;
  1116. });
  1117. }
  1118. //新增技术指标
  1119. },
  1120. // 删除基础信息行
  1121. removeBasicInfo1(item,index) {
  1122. if(item.id==''){
  1123. this.jsDetail.info.splice(index, 1);
  1124. }else{
  1125. this.$confirm('删除后,数据将无法恢复,是否确认删除!', '提示', {
  1126. confirmButtonText: '确定',
  1127. cancelButtonText: '取消',
  1128. type: 'warning'
  1129. }).then(() => {
  1130. deleteItemInfo({id:item.id}).then((res) => {
  1131. if(res.data.code==200){
  1132. this.$message.success(res.data.msg);
  1133. this.jsDetail.info.splice(index, 1);
  1134. this.getRuleDataDetail(this.ruleItemDetail);
  1135. this.getRuleDataDetail1(this.ruleItemDetail,1);
  1136. this.ypDetail.info.splice(index, 2);
  1137. }else{
  1138. this.$message.error(res.data.msg);
  1139. }
  1140. });
  1141. }).catch(() => {
  1142. this.$message.info('已取消删除');
  1143. })
  1144. }
  1145. },
  1146. //条件设置
  1147. conditionsSet(){
  1148. if(this.jsDetail.info[0].name === '') {
  1149. this.$message.error('请先添加技术指标内容');
  1150. return;
  1151. }
  1152. this.$refs.conditionsSetRef.show(this.jsDetail.info,this.ruleItemDetail.id);
  1153. },
  1154. // 添加确认取消处理方法
  1155. handleConditionsConfirm() {
  1156. console.log('确认条件设置')
  1157. },
  1158. handleConditionsCancel() {
  1159. console.log('取消条件设置')
  1160. },
  1161. //关联元素
  1162. linkEle() {
  1163. if(this.jsDetail.info[0].name === '') {
  1164. this.$message.error('请先添加技术指标内容');
  1165. return;
  1166. }
  1167. this.$refs.linkEleRef.show(this.jsDetail.info, this.treeId,this.id, this.projectid,this.ruleItemDetail.id);
  1168. },
  1169. confirmLinkEle() {
  1170. console.log('确认关联元素')
  1171. },
  1172. //效果预览
  1173. previewRes() {
  1174. this.$refs.previewResultRef.show()
  1175. },
  1176. refreshRule(){
  1177. }
  1178. }
  1179. }
  1180. </script>
  1181. <style scoped lang="scss">
  1182. .container-box {
  1183. height: calc(100vh - 120px);
  1184. box-sizing: border-box;
  1185. }
  1186. .h-100 {
  1187. height: 100%;
  1188. }
  1189. .tree-container {
  1190. height: calc(100vh - 120px);
  1191. overflow-y: auto;
  1192. }
  1193. .box-card {
  1194. display: flex;
  1195. flex-direction: column;
  1196. height: 100%;
  1197. // 内容区域
  1198. .el-card__body {
  1199. flex: 1;
  1200. display: flex;
  1201. flex-direction: column;
  1202. overflow: hidden;
  1203. }
  1204. }
  1205. .rule-box{
  1206. width: 100%;
  1207. display: grid;
  1208. grid-template-columns: repeat(8, 1fr);
  1209. grid-template-rows: repeat(4, 1fr);
  1210. gap: 50px;
  1211. padding: 20px;
  1212. height: 600px;
  1213. overflow-y:hidden;
  1214. .rule-box-item{
  1215. text-align: center;
  1216. display: flex;
  1217. flex-direction: column;
  1218. align-items: center;
  1219. }
  1220. .rule-box-item-icon {
  1221. margin-bottom: 8px;
  1222. }
  1223. .rule-box-item-title {
  1224. font-size: 14px;
  1225. width: 100%;
  1226. overflow: hidden;
  1227. text-overflow: ellipsis;
  1228. white-space: nowrap;
  1229. }
  1230. }
  1231. .input-container {
  1232. display: flex;
  1233. align-items: center;
  1234. }
  1235. .input-container span {
  1236. margin-right: 10px; /* 根据需要调整间距 */
  1237. }
  1238. .box-card-title{
  1239. font-weight: bolder;
  1240. font-size: 24px;
  1241. }
  1242. .box-card-content1{
  1243. margin-top: 10px;
  1244. display: flex;
  1245. justify-content: space-between;
  1246. width: 100%;
  1247. .box-card-content1-left{
  1248. display: flex;
  1249. .box-card-content1-left-item{
  1250. margin-right: 25px;
  1251. }
  1252. }
  1253. }
  1254. .box-card-content2{
  1255. margin-top: 10px;
  1256. .box-card-content2-title{
  1257. color: rgba(130, 130, 130, 1);
  1258. font-size: 10px;;
  1259. width: 98%;
  1260. padding-left: 20px;
  1261. font-size: 18px;
  1262. line-height: 40px;
  1263. background: rgb(240, 240, 240);
  1264. .title-container {
  1265. display: flex;
  1266. justify-content: space-between;
  1267. align-items: center;
  1268. padding-right: 20px;
  1269. i {
  1270. cursor: pointer;
  1271. font-size: 22px;
  1272. color: #2550A2;
  1273. // 添加过渡效果
  1274. &:hover {
  1275. color: #409EFF;
  1276. }
  1277. }
  1278. }
  1279. }
  1280. }
  1281. .box-card-content2-bottom{
  1282. margin-top: 20px;
  1283. }
  1284. .add-yp-title{
  1285. font-size: 20px;
  1286. font-weight: bold;
  1287. padding: 10px;
  1288. display: flex;
  1289. justify-content: space-between;
  1290. }
  1291. .input-with-icon {
  1292. display: flex;
  1293. align-items: center;
  1294. margin-bottom: 15px;
  1295. .el-input {
  1296. flex: 1;
  1297. }
  1298. i {
  1299. margin-left: 10px;
  1300. font-size: 20px;
  1301. cursor: pointer;
  1302. &.el-icon-circle-plus-outline {
  1303. color: #409EFF;
  1304. &:hover {
  1305. color: #66b1ff;
  1306. }
  1307. }
  1308. &.el-icon-remove-outline {
  1309. color: #F56C6C;
  1310. &:hover {
  1311. color: #f78989;
  1312. }
  1313. }
  1314. }
  1315. }
  1316. .add-yp-detail{
  1317. flex: 1;
  1318. overflow-y: auto;
  1319. padding: 20px;
  1320. height: calc(100vh - 342px); /* 减去标题和底部按钮的高度 */
  1321. }
  1322. // 新增底部按钮容器样式
  1323. .add-yp-footer {
  1324. display: flex;
  1325. justify-content: center;
  1326. padding: 20px 0;
  1327. // 可选: 添加上边框
  1328. border-top: 1px solid #EBEEF5;
  1329. }
  1330. .box-card-content2-list{
  1331. margin-top: 20px;
  1332. max-height: 300px;
  1333. overflow-y: auto;
  1334. .eg{
  1335. color:rgba(37, 80, 162, 1);
  1336. margin-right: 10px;
  1337. }
  1338. .box-card-content2-list-item{
  1339. height: 80px;
  1340. padding: 10px;
  1341. border: 2px solid #EBEEF5;
  1342. margin-bottom: 10px;
  1343. }
  1344. .box-card-content2-list-item-list{
  1345. display: flex;
  1346. margin-top: 20px;
  1347. align-items: center;
  1348. position: relative;
  1349. .operation-icons {
  1350. position: absolute;
  1351. right: 10px;
  1352. top: 10px;
  1353. display: flex;
  1354. gap: 10px;
  1355. i {
  1356. cursor: pointer;
  1357. font-size: 16px;
  1358. &.el-icon-edit {
  1359. color: #409EFF;
  1360. &:hover {
  1361. color: #66b1ff;
  1362. }
  1363. }
  1364. &.el-icon-delete {
  1365. color: #F56C6C;
  1366. &:hover {
  1367. color: #f78989;
  1368. }
  1369. }
  1370. }
  1371. }
  1372. .basic-info{
  1373. color: gray;
  1374. font-size: 14px;
  1375. }
  1376. .box-card-content2-list-item-list-basic{
  1377. display: flex;
  1378. margin-left: 10px;
  1379. width: 100%;
  1380. overflow-x: auto;
  1381. flex: 1;
  1382. .basic-item-info{
  1383. margin-right: 10px;
  1384. margin-right: 20px;
  1385. flex-shrink: 0; // 防止项目被压缩
  1386. }
  1387. }
  1388. }
  1389. }
  1390. .empty-container{
  1391. height: 600px;
  1392. }
  1393. .dialog-footer{
  1394. text-align: center;
  1395. }
  1396. </style>