index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. <template>
  2. <div class="app-container">
  3. <el-form style="background-color: #fff;border-radius: 4px; padding-top: 10px;" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
  4. <el-form-item label="入库时间" prop="noticeTitle">
  5. <el-input
  6. v-model="queryParams.noticeTitle"
  7. placeholder="请输入公告标题"
  8. clearable
  9. @keyup.enter.native="handleQuery"
  10. />
  11. </el-form-item>
  12. <el-form-item label="投资方名称" prop="createBy">
  13. <el-input
  14. v-model="queryParams.createBy"
  15. placeholder="请输入操作人员"
  16. clearable
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  22. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  23. </el-form-item>
  24. </el-form>
  25. <!-- <el-row :gutter="10" class="mb8">
  26. <el-col :span="1.5">
  27. <el-button
  28. type="primary"
  29. plain
  30. icon="el-icon-plus"
  31. size="mini"
  32. @click="handleAdd"
  33. v-hasPermi="['system:notice:add']"
  34. >新增</el-button>
  35. </el-col>
  36. <el-col :span="1.5">
  37. <el-button
  38. type="success"
  39. plain
  40. icon="el-icon-edit"
  41. size="mini"
  42. :disabled="single"
  43. @click="handleUpdate"
  44. v-hasPermi="['system:notice:edit']"
  45. >修改</el-button>
  46. </el-col>
  47. <el-col :span="1.5">
  48. <el-button
  49. type="danger"
  50. plain
  51. icon="el-icon-delete"
  52. size="mini"
  53. :disabled="multiple"
  54. @click="handleDelete"
  55. v-hasPermi="['system:notice:remove']"
  56. >删除</el-button>
  57. </el-col>
  58. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  59. </el-row> -->
  60. <div style="margin-top: 15px;">
  61. <div class=" infinite-list" :style="dynamicStyle" >
  62. <div :class=" ishsouetan == false? 'imghse hyeg' : 'hyeg'" style="display: flex;flex-wrap: wrap;justify-content: space-between; " >
  63. <div :class=" ishsouetan == false? 'box_3dr zuihsoue flex-col' : 'box_3dr flex-col'" v-for="(item,index ) in 4" :key="index" >
  64. <div :class=" index == 0?'nshge box_4 flex-row' : 'box_4 flex-row'" style="justify-content: space-between;margin: 0;">
  65. <div @click="handleSelectionChange(item)" style="display: flex;align-items: center; cursor: pointer;" >
  66. <img
  67. class="thumbnail_21"
  68. referrerpolicy="no-referrer"
  69. src="../../../assets/images/icon_tzfk_mp_qy_white.png"
  70. v-if="index == 0"
  71. />
  72. <img
  73. class="thumbnail_21"
  74. referrerpolicy="no-referrer"
  75. src="../../../assets/images/icon_tzfk_mp_qy_blue.png"
  76. v-else
  77. />
  78. <span class="text_19">华能新能源科技有限公司</span>
  79. </div>
  80. <div>
  81. <img
  82. class="image_1"
  83. referrerpolicy="no-referrer"
  84. @click="handleUpdate(item)"
  85. v-hasPermi="['manage:equipmentManage:edit']"
  86. src="../../../assets/images/icon_tzfk_mp_gx_selected.png"
  87. v-if="index == 0"
  88. />
  89. <img
  90. class="image_1"
  91. referrerpolicy="no-referrer"
  92. @click="handleUpdate(item)"
  93. v-hasPermi="['manage:equipmentManage:edit']"
  94. src="../../../assets/images/icon_tzfk_mp_gx_normal.png"
  95. v-else
  96. />
  97. <img
  98. class="thumbnail_22"
  99. @click="handleDelete(item)"
  100. v-hasPermi="['manage:equipmentManage:remove']"
  101. referrerpolicy="no-referrer"
  102. src="../../../assets/images/icon_tzfk_mp_gd_white.png"
  103. v-if="index == 0"
  104. />
  105. <img
  106. class="thumbnail_22"
  107. @click="handleDelete(item)"
  108. v-hasPermi="['manage:equipmentManage:remove']"
  109. referrerpolicy="no-referrer"
  110. src="../../../assets/images/icon_tzfk_mp_gd_black.png"
  111. v-else
  112. />
  113. </div>
  114. </div>
  115. <div style="padding: 10px;">
  116. <span class="text_20">联系人:王敏溪 </span>
  117. <div class="box_6 flex-row " style="align-items: center;">
  118. <span class="text_21">联系方式: </span>
  119. <div style="margin-left: 12px;">
  120. 15855355431
  121. </div>
  122. </div>
  123. <div class="box_6 flex-row " style=" margin-bottom: 5px; margin-top: 0; align-items: center;">
  124. <span class="text_21" style="width: 88px;">企业注册时间:</span>
  125. <div style=" margin-left: 12px; font-weight: 500;font-size: 14px;color: #666666; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
  126. 2018 年 7 月 23 日
  127. </div>
  128. </div>
  129. <!-- <span class="text_20">设备地址:192.168.1.1</span> -->
  130. <span class="text_20" >注册资金:500万元</span>
  131. </div>
  132. <div class="xnhse">
  133. <div>
  134. <img
  135. referrerpolicy="no-referrer"
  136. src="../../../assets/images/icon_tzfk_mp_gd_bj.png"/>
  137. <span>编辑信息</span>
  138. </div>
  139. <div style="margin: 10px 0;">
  140. <img
  141. referrerpolicy="no-referrer"
  142. src="../../../assets/images/icon_tzfk_mp_gd_ls.png"/>
  143. <span>历史投资</span>
  144. </div>
  145. <div>
  146. <img
  147. referrerpolicy="no-referrer"
  148. src="../../../assets/images/icon_tzfk_mp_gd_del.png"/>
  149. <span>删除名片</span>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <!-- <div v-if='equipmentManageList == 0'>
  155. <el-empty :image-size="200"></el-empty>
  156. </div> -->
  157. </div>
  158. </div>
  159. <paginations
  160. v-show="total>0"
  161. :total="total"
  162. :page.sync="queryParams.pageNum"
  163. :limit.sync="queryParams.pageSize"
  164. @pagination="getList"
  165. />
  166. <!-- 添加或修改公告对话框 -->
  167. <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
  168. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  169. <el-row>
  170. <el-col :span="12">
  171. <el-form-item label="公告标题" prop="noticeTitle">
  172. <el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
  173. </el-form-item>
  174. </el-col>
  175. <el-col :span="12">
  176. <el-form-item label="公告类型" prop="noticeType">
  177. <el-select v-model="form.noticeType" placeholder="请选择公告类型">
  178. <el-option
  179. v-for="dict in dict.type.sys_notice_type"
  180. :key="dict.value"
  181. :label="dict.label"
  182. :value="dict.value"
  183. ></el-option>
  184. </el-select>
  185. </el-form-item>
  186. </el-col>
  187. <el-col :span="24">
  188. <el-form-item label="状态">
  189. <el-radio-group v-model="form.status">
  190. <el-radio
  191. v-for="dict in dict.type.sys_notice_status"
  192. :key="dict.value"
  193. :label="dict.value"
  194. >{{dict.label}}</el-radio>
  195. </el-radio-group>
  196. </el-form-item>
  197. </el-col>
  198. <el-col :span="24">
  199. <el-form-item label="内容">
  200. <editor v-model="form.noticeContent" :min-height="192"/>
  201. </el-form-item>
  202. </el-col>
  203. </el-row>
  204. </el-form>
  205. <div slot="footer" class="dialog-footer">
  206. <el-button type="primary" @click="submitForm">确 定</el-button>
  207. <el-button @click="cancel">取 消</el-button>
  208. </div>
  209. </el-dialog>
  210. </div>
  211. </template>
  212. <script>
  213. import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice"
  214. export default {
  215. name: "Notice",
  216. dicts: ['sys_notice_status', 'sys_notice_type'],
  217. data() {
  218. return {
  219. // 遮罩层
  220. loading: true,
  221. // 选中数组
  222. ids: [],
  223. // 非单个禁用
  224. single: true,
  225. // 非多个禁用
  226. multiple: true,
  227. // 显示搜索条件
  228. showSearch: true,
  229. ishsouetan:false,
  230. // 总条数
  231. total: 0,
  232. // 公告表格数据
  233. noticeList: [],
  234. // 弹出层标题
  235. title: "",
  236. // 是否显示弹出层
  237. open: false,
  238. // 查询参数
  239. queryParams: {
  240. pageNum: 1,
  241. pageSize: 10,
  242. noticeTitle: undefined,
  243. createBy: undefined,
  244. status: undefined
  245. },
  246. // 表单参数
  247. form: {},
  248. // 表单校验
  249. rules: {
  250. noticeTitle: [
  251. { required: true, message: "公告标题不能为空", trigger: "blur" }
  252. ],
  253. noticeType: [
  254. { required: true, message: "公告类型不能为空", trigger: "change" }
  255. ]
  256. },
  257. tableMaxHeight:380
  258. }
  259. },
  260. created() {
  261. this.getList()
  262. },
  263. computed: {
  264. dynamicStyle() {
  265. return {
  266. overflow:'auto',
  267. height: this.tableMaxHeight + 'px',
  268. }
  269. }
  270. },
  271. methods: {
  272. /** 查询公告列表 */
  273. getList() {
  274. this.loading = true
  275. listNotice(this.queryParams).then(response => {
  276. this.noticeList = response.rows
  277. this.total = response.total
  278. this.loading = false
  279. })
  280. },
  281. // 取消按钮
  282. cancel() {
  283. this.open = false
  284. this.reset()
  285. },
  286. // 表单重置
  287. reset() {
  288. this.form = {
  289. noticeId: undefined,
  290. noticeTitle: undefined,
  291. noticeType: undefined,
  292. noticeContent: undefined,
  293. status: "0"
  294. }
  295. this.resetForm("form")
  296. },
  297. /** 搜索按钮操作 */
  298. handleQuery() {
  299. this.queryParams.pageNum = 1
  300. this.getList()
  301. },
  302. /** 重置按钮操作 */
  303. resetQuery() {
  304. this.resetForm("queryForm")
  305. this.handleQuery()
  306. },
  307. // 多选框选中数据
  308. handleSelectionChange(selection) {
  309. this.ids = selection.map(item => item.noticeId)
  310. this.single = selection.length!=1
  311. this.multiple = !selection.length
  312. },
  313. /** 新增按钮操作 */
  314. handleAdd() {
  315. this.reset()
  316. this.open = true
  317. this.title = "添加公告"
  318. },
  319. /** 修改按钮操作 */
  320. handleUpdate(row) {
  321. this.reset()
  322. const noticeId = row.noticeId || this.ids
  323. getNotice(noticeId).then(response => {
  324. this.form = response.data
  325. this.open = true
  326. this.title = "修改公告"
  327. })
  328. },
  329. /** 提交按钮 */
  330. submitForm: function() {
  331. this.$refs["form"].validate(valid => {
  332. if (valid) {
  333. if (this.form.noticeId != undefined) {
  334. updateNotice(this.form).then(response => {
  335. this.$modal.msgSuccess("修改成功")
  336. this.open = false
  337. this.getList()
  338. })
  339. } else {
  340. addNotice(this.form).then(response => {
  341. this.$modal.msgSuccess("新增成功")
  342. this.open = false
  343. this.getList()
  344. })
  345. }
  346. }
  347. })
  348. },
  349. /** 删除按钮操作 */
  350. handleDelete(row) {
  351. const noticeIds = row.noticeId || this.ids
  352. this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function() {
  353. return delNotice(noticeIds)
  354. }).then(() => {
  355. this.getList()
  356. this.$modal.msgSuccess("删除成功")
  357. }).catch(() => {})
  358. }
  359. }
  360. }
  361. </script>
  362. <style scoped lang="scss">
  363. .flex-col {
  364. display: flex;
  365. flex-direction: column;
  366. }
  367. .flex-row {
  368. display: flex;
  369. flex-direction: row;
  370. }
  371. .justify-between {
  372. display: flex;
  373. justify-content: space-between;
  374. }
  375. .box_3dr {
  376. background-color: rgba(255, 255, 255, 1);
  377. border-radius: 10px;
  378. position: relative;
  379. width: 49%;
  380. // height: 100%;
  381. /* padding-bottom: 15px; */
  382. /* margin-left: 5px ;
  383. margin-right: 5px; */
  384. margin-bottom: 10px !important;
  385. }
  386. .box_4 {
  387. width: 100%;
  388. /* height: 18px; */
  389. padding: 11px 10px 11px 10px;
  390. border-bottom: 1px solid #E6E6E6;
  391. }
  392. .thumbnail_21 {
  393. width: 18px;
  394. height: 18px;
  395. }
  396. .text_19 {
  397. /* width: 97px; */
  398. height: 13px;
  399. overflow-wrap: break-word;
  400. color: rgba(34, 35, 39, 1);
  401. font-size: 16px;
  402. font-family: PingFang-SC-Bold;
  403. font-weight: 700;
  404. text-align: left;
  405. white-space: nowrap;
  406. line-height: 13px;
  407. margin: 0 0 0 11px;
  408. }
  409. .image_1 {
  410. width:14px;
  411. height: 14px;
  412. /* margin-left: 51px; */
  413. }
  414. .thumbnail_22 {
  415. // width: 14px;
  416. // height: 14px;
  417. margin: 3px 0 0 10px;
  418. }
  419. .image_2 {
  420. width: 248px;
  421. height: 1px;
  422. margin-top: 9px;
  423. }
  424. .box_5 {
  425. background-color: rgba(255, 255, 255, 1);
  426. /* width: 220px; */
  427. height: 118px;
  428. padding: 10px;
  429. /* margin: 12px 0 0 14px; */
  430. }
  431. .text_20 {
  432. /* width: 139px; */
  433. height: 14px;
  434. overflow-wrap: break-word;
  435. font-family: PingFang SC;
  436. font-weight: 500;
  437. font-size: 14px;
  438. color: #666666;
  439. text-align: left;
  440. white-space: nowrap;
  441. line-height: 8px;
  442. margin: 0 0 14px 0;
  443. }
  444. .box_6 {
  445. /* width: 126px; */
  446. height: 24px;
  447. margin: 5px 0 0 0;
  448. font-family: PingFang SC;
  449. font-weight: 500;
  450. font-size: 14px;
  451. color: #666666;
  452. }
  453. .text_21 {
  454. width: 60px;
  455. height: 14px;
  456. overflow-wrap: break-word;
  457. font-family: PingFang SC;
  458. font-weight: 500;
  459. font-size: 14px;
  460. color: #666666;
  461. font-weight: 500;
  462. text-align: left;
  463. white-space: nowrap;
  464. line-height: 8px;
  465. margin-top: 5px;
  466. }
  467. .text-wrapper_7 {
  468. background-color: rgba(255, 244, 235, 1);
  469. border-radius: 4px;
  470. height: 24px;
  471. border: 1px solid rgba(253, 127, 16, 1);
  472. width: 58px;
  473. }
  474. .text_22 {
  475. width: 42px;
  476. height: 13px;
  477. overflow-wrap: break-word;
  478. color: rgba(253, 127, 16, 1);
  479. font-size: 14px;
  480. font-family: PingFang-SC-Medium;
  481. font-weight: 500;
  482. text-align: left;
  483. white-space: nowrap;
  484. line-height: 46px;
  485. margin: 6px 0 0 8px;
  486. }
  487. .text_23 {
  488. width: 145px;
  489. height: 14px;
  490. overflow-wrap: break-word;
  491. color: rgba(34, 35, 39, 1);
  492. font-size: 14px;
  493. font-family: PingFang-SC-Medium;
  494. font-weight: 500;
  495. text-align: left;
  496. white-space: nowrap;
  497. line-height: 46px;
  498. margin: 8px 0 0 14px;
  499. }
  500. .text_24 {
  501. width: 152px;
  502. height: 14px;
  503. overflow-wrap: break-word;
  504. color: rgba(34, 35, 39, 1);
  505. font-size: 14px;
  506. font-family: PingFang-SC-Medium;
  507. font-weight: 500;
  508. text-align: left;
  509. white-space: nowrap;
  510. line-height: 46px;
  511. margin: 13px 0 0 14px;
  512. }
  513. .text_25 {
  514. width: 154px;
  515. height: 14px;
  516. overflow-wrap: break-word;
  517. color: rgba(34, 35, 39, 1);
  518. font-size: 14px;
  519. font-family: PingFang-SC-Medium;
  520. font-weight: 500;
  521. text-align: left;
  522. white-space: nowrap;
  523. line-height: 46px;
  524. margin: 13px 0 15px 15px;
  525. }
  526. .box_7 {
  527. box-shadow: 0px 0px 10px 0px rgba(209, 209, 209, 1);
  528. background-color: rgba(255, 255, 255, 1);
  529. border-radius: 8px;
  530. position: absolute;
  531. left: 159px;
  532. top: 35px;
  533. width: 88px;
  534. height: 70px;
  535. }
  536. .image-text_2 {
  537. width: 58px;
  538. height: 15px;
  539. margin: 13px 0 0 16px;
  540. }
  541. .thumbnail_23 {
  542. width: 15px;
  543. height: 15px;
  544. }
  545. .text-group_2 {
  546. width: 27px;
  547. height: 14px;
  548. overflow-wrap: break-word;
  549. color: rgba(61, 69, 91, 1);
  550. font-size: 14px;
  551. font-family: PingFang-SC-Medium;
  552. font-weight: 500;
  553. text-align: left;
  554. white-space: nowrap;
  555. line-height: 80px;
  556. margin-top: 1px;
  557. }
  558. .image-text_3 {
  559. width: 59px;
  560. height: 17px;
  561. margin: 11px 0 14px 15px;
  562. }
  563. .thumbnail_24 {
  564. width: 16px;
  565. height: 17px;
  566. }
  567. .text-group_3 {
  568. width: 27px;
  569. height: 14px;
  570. overflow-wrap: break-word;
  571. color: rgba(61, 69, 91, 1);
  572. font-size: 14px;
  573. font-family: PingFang-SC-Medium;
  574. font-weight: 500;
  575. text-align: left;
  576. white-space: nowrap;
  577. line-height: 80px;
  578. margin-top: 2px;
  579. }
  580. .zuihsoue{
  581. width: 32.2%;
  582. margin: 0 5px;
  583. justify-content: flex-start !important;
  584. height: 155px;
  585. }
  586. .imghse{
  587. justify-content: flex-start !important;
  588. }
  589. .hyeg{
  590. // height: 100% !important;
  591. }
  592. .xnhse{
  593. width: 110px;
  594. height: 102px;
  595. background: #FFFFFF;
  596. box-shadow: 0px 0px 10px 0px #D1D1D1;
  597. border-radius: 8px;
  598. padding: 15px;
  599. position: absolute;
  600. right: 0;
  601. top:40px;
  602. div{
  603. display: flex;
  604. justify-content: space-between;
  605. align-items: center;
  606. span{
  607. font-family: PingFang SC;
  608. font-weight: 500;
  609. font-size: 14px;
  610. color: #3D455B;
  611. }
  612. }
  613. }
  614. .nshge{
  615. background-color: #1890FF;
  616. span{
  617. color: #fff;
  618. }
  619. }
  620. </style>