index.vue 14 KB

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