index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. <template>
  2. <div class="app-container">
  3. <!-- <div class="header">
  4. <span>
  5. 项目详情 >
  6. </span>
  7. </div> -->
  8. <div style="height: 85px"></div>
  9. <div class="naue">
  10. <!-- //步骤条 -->
  11. <div class="nuae_wtu">
  12. <div class="naue_one">
  13. <p class="naue_name">项目名称:电子类企业</p>
  14. <p>返乡创业:是</p>
  15. <p>所属产业:电子产业</p>
  16. </div>
  17. <div class="naue_two">
  18. <el-steps :active="naueactive" align-center finish-status="success">
  19. <el-step
  20. v-for="(item, index) in configList"
  21. :key="index"
  22. :title="item.dictLabel"
  23. ></el-step>
  24. <!-- <el-step title="线索审核成功"></el-step>
  25. <el-step title="签约审核成功"></el-step>
  26. <el-step title="在建审核成功"></el-step>
  27. <el-step title="结束"></el-step> -->
  28. </el-steps>
  29. </div>
  30. </div>
  31. <!-- //tab栏 -->
  32. <!-- <div class="naue_tab">
  33. <p @click="tabClid(index)" v-for="(item,index) in tabNume" :key="index" :class="[tab == index? 'p' : '']">{{item}}</p>
  34. </div> -->
  35. <my-tabs :tabList="tabList" :tabIndex="tabIndex" @changeTab="changeTab">
  36. <keep-alive>
  37. <component :is="currentContent"> </component>
  38. </keep-alive>
  39. </my-tabs>
  40. <!-- 内容的显示隐藏 -->
  41. <!-- 在建项目 -->
  42. </div>
  43. <!-- 添加或修改参数配置对话框 -->
  44. <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
  45. <el-form ref="form" :model="form" :rules="rules" label-width="150px">
  46. <el-form-item label="企业名称" prop="configName">
  47. <el-input v-model="form.configName" placeholder="请输入企业名称" />
  48. </el-form-item>
  49. <el-form-item label="企业所在地" prop="configKey">
  50. <el-input v-model="form.configKey" placeholder="请输入参数键名" />
  51. </el-form-item>
  52. <el-form-item label="法人代表姓名" prop="configValue">
  53. <el-input v-model="form.configValue" placeholder="请输入参数键值" />
  54. </el-form-item>
  55. <el-form-item label="系统内置" prop="configType">
  56. <el-radio-group v-model="form.configType">
  57. <el-radio
  58. v-for="dict in typeOptions"
  59. :key="dict.dictValue"
  60. :label="dict.dictValue"
  61. >{{ dict.dictLabel }}</el-radio
  62. >
  63. </el-radio-group>
  64. </el-form-item>
  65. <el-form-item label="统一社会信用代码" prop="remark">
  66. <el-input
  67. v-model="form.remark"
  68. placeholder="请输入统一社会信用代码"
  69. />
  70. </el-form-item>
  71. <el-form-item label="联系方式" prop="remark">
  72. <el-input v-model="form.remark" placeholder="请输入联系方式" />
  73. </el-form-item>
  74. </el-form>
  75. <div slot="footer" class="dialog-footer">
  76. <el-button type="primary" @click="submitForm">确 定</el-button>
  77. <el-button @click="cancel">取 消</el-button>
  78. </div>
  79. </el-dialog>
  80. </div>
  81. </template>
  82. <script>
  83. import {
  84. listConfig,
  85. listConfigther,
  86. getConfig,
  87. delConfig,
  88. addConfig,
  89. updateConfig,
  90. exportConfig,
  91. clearCache,
  92. } from "@/api/system/config";
  93. import myTabs from "../../tab/index.vue";
  94. import One from "../../under/index.vue";
  95. import Two from "../nstruction/index.vue";
  96. import Three from "../roduction/index.vue";
  97. import Four from "../../../components/ProjectDec/SignContract.vue";
  98. export default {
  99. name: "Config",
  100. components: {
  101. myTabs,
  102. one: One,
  103. two: Two,
  104. three: Three,
  105. four: Four,
  106. },
  107. data() {
  108. return {
  109. tabIndex: 0,
  110. currentContent: "one",
  111. tabList: [
  112. {
  113. index: 0,
  114. name: "线索信息",
  115. component: "one",
  116. },
  117. {
  118. index: 2,
  119. name: "签约信息",
  120. component: "four",
  121. },
  122. {
  123. index: 3,
  124. name: "在建信息",
  125. component: "two",
  126. },
  127. {
  128. index: 4,
  129. name: "投产信息",
  130. component: "three",
  131. },
  132. ],
  133. // 遮罩层
  134. loading: true,
  135. //步骤条
  136. naueactive: 0,
  137. tab: 1,
  138. tabNume: ["线索信息", "签约信息", "在建信息", "投产信息"],
  139. // 选中数组
  140. ids: [],
  141. // 非单个禁用
  142. single: true,
  143. // 非多个禁用
  144. multiple: true,
  145. // 显示搜索条件
  146. showSearch: true,
  147. // 总条数
  148. total: 0,
  149. // 参数表格数据
  150. configList: [],
  151. // 弹出层标题
  152. title: "",
  153. // 是否显示弹出层
  154. open: false,
  155. // 类型数据字典
  156. typeOptions: [],
  157. // 日期范围
  158. dateRange: [],
  159. // 查询参数
  160. queryParams: {
  161. // pageNum: 1,
  162. // pageSize: 10,
  163. // configName: undefined,
  164. // configKey: undefined,
  165. // configType: undefined
  166. },
  167. // 表单参数
  168. form: {},
  169. // 表单校验
  170. rules: {
  171. configName: [
  172. { required: true, message: "参数名称不能为空", trigger: "blur" },
  173. ],
  174. configKey: [
  175. { required: true, message: "参数键名不能为空", trigger: "blur" },
  176. ],
  177. configValue: [
  178. { required: true, message: "参数键值不能为空", trigger: "blur" },
  179. ],
  180. },
  181. };
  182. },
  183. created() {
  184. if (this.$route.query.setrd == 0) {
  185. this.naueactive = this.$route.query.setrd - 0;
  186. } else {
  187. this.naueactive = this.$route.query.setrd - 0 - 1;
  188. }
  189. console.log(this.naueactive);
  190. this.getList();
  191. this.getDicts("sys_yes_no").then((response) => {
  192. this.typeOptions = response.data;
  193. });
  194. },
  195. methods: {
  196. /** 查询参数列表 */
  197. getList() {
  198. this.loading = true;
  199. listConfigther().then((response) => {
  200. console.log(response);
  201. this.configList = response.data;
  202. // this.total = response.total;
  203. this.loading = false;
  204. });
  205. },
  206. // 参数系统内置字典翻译
  207. typeFormat(row, column) {
  208. return this.selectDictLabel(this.typeOptions, row.configType);
  209. },
  210. // 取消按钮
  211. cancel() {
  212. this.open = false;
  213. this.reset();
  214. },
  215. // 表单重置
  216. reset() {
  217. this.form = {
  218. configId: undefined,
  219. configName: undefined,
  220. configKey: undefined,
  221. configValue: undefined,
  222. configType: "Y",
  223. remark: undefined,
  224. };
  225. this.resetForm("form");
  226. },
  227. /** 搜索按钮操作 */
  228. handleQuery() {
  229. this.queryParams.pageNum = 1;
  230. this.getList();
  231. },
  232. /** 重置按钮操作 */
  233. resetQuery() {
  234. this.dateRange = [];
  235. this.resetForm("queryForm");
  236. this.handleQuery();
  237. },
  238. /** 新增按钮操作 */
  239. handleAdd() {
  240. console.log(this.queryParams);
  241. // this.reset();
  242. // this.open = true;
  243. // this.title = "添加参数";
  244. },
  245. // 多选框选中数据
  246. handleSelectionChange(selection) {
  247. this.ids = selection.map((item) => item.configId);
  248. this.single = selection.length != 1;
  249. this.multiple = !selection.length;
  250. },
  251. /** 修改按钮操作 */
  252. handleUpdate(row) {
  253. this.reset();
  254. const configId = row.configId || this.ids;
  255. getConfig(configId).then((response) => {
  256. this.form = response.data;
  257. this.open = true;
  258. this.title = "修改参数";
  259. });
  260. },
  261. /** 提交按钮 */
  262. submitForm: function () {
  263. this.$refs["form"].validate((valid) => {
  264. if (valid) {
  265. if (this.form.configId != undefined) {
  266. updateConfig(this.form).then((response) => {
  267. this.msgSuccess("修改成功");
  268. this.open = false;
  269. this.getList();
  270. });
  271. } else {
  272. addConfig(this.form).then((response) => {
  273. this.msgSuccess("新增成功");
  274. this.open = false;
  275. this.getList();
  276. });
  277. }
  278. }
  279. });
  280. },
  281. /** 删除按钮操作 */
  282. handleDelete(row) {
  283. const configIds = row.configId || this.ids;
  284. this.$confirm(
  285. '是否确认删除参数编号为"' + configIds + '"的数据项?',
  286. "警告",
  287. {
  288. confirmButtonText: "确定",
  289. cancelButtonText: "取消",
  290. type: "warning",
  291. }
  292. )
  293. .then(function () {
  294. return delConfig(configIds);
  295. })
  296. .then(() => {
  297. this.getList();
  298. this.msgSuccess("删除成功");
  299. });
  300. },
  301. /** 导出按钮操作 */
  302. handleExport() {
  303. const queryParams = this.queryParams;
  304. this.$confirm("是否确认导出所有参数数据项?", "警告", {
  305. confirmButtonText: "确定",
  306. cancelButtonText: "取消",
  307. type: "warning",
  308. })
  309. .then(function () {
  310. return exportConfig(queryParams);
  311. })
  312. .then((response) => {
  313. this.download(response.msg);
  314. });
  315. },
  316. /** 清理缓存按钮操作 */
  317. handleClearCache() {
  318. clearCache().then((response) => {
  319. this.msgSuccess("清理成功");
  320. });
  321. },
  322. //tab
  323. changeTab(index) {
  324. console.log(34);
  325. this.tabIndex = index.index;
  326. this.currentContent = index.component;
  327. // this.$router.push('/tab');
  328. },
  329. },
  330. };
  331. </script>
  332. <style rel="stylesheet/scss" lang="scss" scoped>
  333. .manager_form {
  334. .manager_lab {
  335. .el-form-item__label {
  336. width: 145px !important;
  337. }
  338. }
  339. .maneg_lar {
  340. position: relative;
  341. .el-form-item__label {
  342. width: 134px !important;
  343. }
  344. span {
  345. position: absolute;
  346. left: -95%;
  347. }
  348. }
  349. .manager_labtwo {
  350. .el-form-item__label {
  351. width: 244px !important;
  352. }
  353. }
  354. .manager_labthre {
  355. // .el-form-item{
  356. .el-form-item__label {
  357. width: 130px !important;
  358. }
  359. margin-right: 40px !important;
  360. // }
  361. }
  362. .ieuyr {
  363. .el-textarea__inner {
  364. height: 80px !important;
  365. }
  366. }
  367. .mage_ter {
  368. .el-form-item__label {
  369. width: 513px !important;
  370. }
  371. }
  372. .maget_ty {
  373. .el-form-item__label {
  374. width: 135px !important;
  375. }
  376. }
  377. .forieu {
  378. border: 1px solid #dcdfe6;
  379. border-radius: 4px;
  380. width: 480px;
  381. height: 90px;
  382. position: relative;
  383. .bure {
  384. position: absolute;
  385. right: 20px;
  386. top: 50%;
  387. transform: translateY(-50%);
  388. }
  389. }
  390. }
  391. .lage_div {
  392. padding-left: 15px;
  393. display: flex;
  394. align-items: center;
  395. margin-bottom: 22px;
  396. .el-form-item {
  397. margin-bottom: 0 !important;
  398. }
  399. }
  400. .app-container {
  401. height: calc(100vh - 84px);
  402. overflow-y: auto;
  403. padding: 0 20px 20px;
  404. .header {
  405. padding-top: 20px;
  406. padding-bottom: 90px;
  407. position: fixed;
  408. z-index: 99;
  409. width: calc(100% - 240px);
  410. background-color: #fff;
  411. span {
  412. display: block;
  413. line-height: 45px;
  414. padding-left: 22px;
  415. color: #343434;
  416. font-size: 18px;
  417. background-color: #f1f1f1;
  418. }
  419. }
  420. .naue {
  421. border: 1px solid #dadada;
  422. padding: 20px;
  423. margin-top: 40px;
  424. .nuae_wtu {
  425. display: flex;
  426. justify-content: center;
  427. align-content: center;
  428. .naue_one {
  429. width: 30%;
  430. p {
  431. font-size: 12px;
  432. font-family: PingFang SC;
  433. font-weight: 400;
  434. color: #343434;
  435. }
  436. .naue_name {
  437. font-size: 14px;
  438. font-family: PingFang SC;
  439. font-weight: bold;
  440. color: #0669b2;
  441. margin-bottom: 30px;
  442. }
  443. }
  444. .naue_two {
  445. flex: 1;
  446. padding-top: 20px;
  447. // display: flex;
  448. // align-items: center;
  449. // justify-content: center;
  450. }
  451. }
  452. //tab
  453. .naue_tab {
  454. border-bottom: 1px solid #cdcdcd;
  455. display: flex;
  456. margin-top: 30px;
  457. padding: 0 10px;
  458. margin-bottom: 30px;
  459. p {
  460. font-size: 12px;
  461. font-family: PingFang SC;
  462. font-weight: 400;
  463. color: #343434;
  464. padding: 11px 15px;
  465. margin: 0;
  466. }
  467. .p {
  468. border-bottom: 2px solid #1c84c6;
  469. margin-bottom: -1px;
  470. }
  471. }
  472. .mation {
  473. .enterprise {
  474. font-size: 14px;
  475. font-family: PingFang SC;
  476. font-weight: bold;
  477. color: #1c84c6;
  478. margin-top: 25px;
  479. margin-bottom: 20px;
  480. }
  481. .enterprise_tw {
  482. i {
  483. margin-right: 5px;
  484. }
  485. font-size: 14px;
  486. font-family: PingFang SC;
  487. font-weight: 600;
  488. color: #666666;
  489. }
  490. }
  491. }
  492. .nvestor {
  493. margin-bottom: 10px;
  494. p {
  495. margin: 0;
  496. font-size: 14px;
  497. font-family: PingFang SC;
  498. font-weight: bold;
  499. color: #343434;
  500. height: 24px;
  501. line-height: 24px;
  502. border-left: 3px solid #1c84c6;
  503. padding-left: 13px;
  504. i {
  505. color: red;
  506. }
  507. }
  508. }
  509. .souu {
  510. font-size: 14px;
  511. font-family: PingFang SC;
  512. font-weight: 400;
  513. color: #343434;
  514. margin-left: 5px;
  515. }
  516. }
  517. //在建项目
  518. .nstruction {
  519. display: flex;
  520. align-items: center;
  521. .nstruction_nav {
  522. display: flex;
  523. align-items: center;
  524. p:nth-child(1) {
  525. margin-right: 10px;
  526. span {
  527. font-size: 14px;
  528. font-family: PingFang SC;
  529. font-weight: bold;
  530. color: #343434;
  531. }
  532. span:nth-child(1) {
  533. color: #df0024;
  534. }
  535. }
  536. p:nth-child(2) {
  537. width: 233px;
  538. height: 30px;
  539. line-height: 30px;
  540. border: 1px solid #cdcdcd;
  541. border-radius: 3px;
  542. padding-left: 14px;
  543. }
  544. }
  545. .nstruction_navne {
  546. margin-left: 50px;
  547. display: flex;
  548. align-items: center;
  549. p:nth-child(1) {
  550. margin-right: 10px;
  551. span {
  552. font-size: 14px;
  553. font-family: PingFang SC;
  554. font-weight: bold;
  555. color: #343434;
  556. }
  557. span:nth-child(1) {
  558. color: #df0024;
  559. }
  560. }
  561. p:nth-child(2) {
  562. width: 233px;
  563. height: 30px;
  564. line-height: 30px;
  565. border: 1px solid #cdcdcd;
  566. border-radius: 3px;
  567. padding-left: 14px;
  568. }
  569. }
  570. }
  571. .kaieu {
  572. padding-left: 60px;
  573. font-size: 14px;
  574. font-family: PingFang SC;
  575. font-weight: 800;
  576. color: #343434;
  577. }
  578. .kaieu_tw {
  579. padding-left: 60px;
  580. font-size: 14px;
  581. font-family: PingFang SC;
  582. font-weight: 500;
  583. color: #666666;
  584. }
  585. </style>