index.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094
  1. <template>
  2. <div class="app-cont">
  3. <!-- <el-row :gutter="10" class="mb8">
  4. <el-col :span="1.5">
  5. <el-button
  6. type="primary"
  7. @click="handleAdd"
  8. v-hasPermi="['system:config:add']"
  9. >提交</el-button>
  10. </el-col>
  11. <el-col :span="1.5">
  12. <el-button
  13. type="primary"
  14. @click="handleUpdate"
  15. v-hasPermi="['system:config:edit']"
  16. >暂存</el-button>
  17. </el-col>
  18. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  19. </el-row> -->
  20. <!-- <div class="naue"> -->
  21. <!-- 内容的显示隐藏 -->
  22. <div class="mation" >
  23. <div class="nvestor">
  24. <p>投资方 <i>*</i></p>
  25. </div>
  26. <p class="enterprise">企业</p>
  27. <p class="enterprise_tw" @click="handleAdd"><i class="el-icon-circle-plus-outline"></i>添加企业</p>
  28. <el-table v-loading="loading" :data="configList" >
  29. <!-- <el-table-column type="selection" width="55" align="center" /> -->
  30. <el-table-column label="企业名称" align="center" prop="companyName" />
  31. <el-table-column label="企业所在地" align="center" prop="companyAddress" :show-overflow-tooltip="true" />
  32. <el-table-column label="法人代表姓名" align="center" prop="companyLegal" :show-overflow-tooltip="true" />
  33. <el-table-column label="统一社会信用代码" align="center" prop="companyCode" />
  34. <el-table-column label="联系方式" align="center" prop="phone" />
  35. <!-- <el-table-column label="操作" align="center" prop="remark" :show-overflow-tooltip="true" /> -->
  36. <el-table-column label="操作" align="center" >
  37. <!-- class-name="small-padding fixed-width" -->
  38. <template slot-scope="scope">
  39. <el-button
  40. size="mini"
  41. type="warning"
  42. @click="handleUpdate(scope.row)"
  43. v-hasPermi="['system:config:edit']"
  44. >修改</el-button>
  45. <el-button
  46. size="mini"
  47. type="danger"
  48. @click="handleDelete(scope.row)"
  49. v-hasPermi="['system:config:remove']"
  50. >删除</el-button>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. <p class="enterprise">自然人</p>
  55. <p class="enterprise_tw" @click="handleAddtwo"><i class="el-icon-circle-plus-outline"></i>添加自然人</p>
  56. <el-table v-loading="loading" :data="configListtwoL" >
  57. <!-- <el-table-column type="selection" width="55" align="center" /> -->
  58. <el-table-column label="姓名" align="center" prop="name" />
  59. <el-table-column label="自然人所在地" align="center" prop="address" :show-overflow-tooltip="true" />
  60. <el-table-column label="身份证号码" align="center" prop="idCode" :show-overflow-tooltip="true" />
  61. <el-table-column label="联系方式" align="center" prop="phone" />
  62. <!-- <el-table-column label="联系方式" align="center" prop="configType" :formatter="typeFormat" /> -->
  63. <!-- <el-table-column label="操作" align="center" prop="remark" :show-overflow-tooltip="true" /> -->
  64. <el-table-column label="操作" align="center" >
  65. <!-- class-name="small-padding fixed-width" -->
  66. <template slot-scope="scope">
  67. <el-button
  68. size="mini"
  69. type="warning"
  70. @click="handleUpdatetwo(scope.row)"
  71. v-hasPermi="['system:config:edit']"
  72. >修改</el-button>
  73. <el-button
  74. size="mini"
  75. type="danger"
  76. @click="handleDeletetwo(scope.row)"
  77. v-hasPermi="['system:config:remove']"
  78. >删除</el-button>
  79. </template>
  80. </el-table-column>
  81. </el-table>
  82. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="115px" label-position="center" class="manager_form">
  83. <el-form-item label="投资方联系人" prop="contactor">
  84. <el-input
  85. v-model="queryParams.contactor"
  86. placeholder="请输入投资方联系人"
  87. clearable
  88. size="small"
  89. style="width: 223px"
  90. @keyup.enter.native="handleQuery"
  91. />
  92. </el-form-item>
  93. <el-form-item label="投资方联系方式:" prop="phone">
  94. <el-input
  95. v-model="queryParams.phone"
  96. placeholder="请输入联系方式"
  97. clearable
  98. size="small"
  99. style="width: 223px"
  100. @keyup.enter.native="handleQuery"
  101. />
  102. </el-form-item>
  103. <div class="nvestor">
  104. <p>引荐方 <i>*</i></p>
  105. </div>
  106. <div v-for="(item,index) in queryParams.referralList " :key="index">
  107. <el-form-item label="引荐单位:" prop="item.sysdeptId">
  108. <el-select v-model="item.sysdeptId" placeholder="系统内置" clearable size="small" style="width: 188px">
  109. <el-option
  110. v-for="dict in typeOptions"
  111. :key="dict.dictValue"
  112. :label="dict.dictLabel"
  113. :value="dict.dictValue"
  114. />
  115. </el-select>
  116. </el-form-item>
  117. <el-form-item label="投资分配额:" prop="item.investmentAllcocation">
  118. <el-input
  119. v-model="item.investmentAllcocation"
  120. placeholder="输入数字"
  121. clearable
  122. size="small"
  123. style="width: 98px"
  124. @keyup.enter.native="handleQuery"
  125. />
  126. <span class="souu">%</span>
  127. </el-form-item>
  128. <el-form-item label="引荐方联系人:" prop="item.referral">
  129. <el-input
  130. v-model="item.referral"
  131. placeholder="请输入"
  132. clearable
  133. size="small"
  134. style="width: 98px"
  135. @keyup.enter.native="handleQuery"
  136. />
  137. </el-form-item>
  138. <el-form-item label="引荐方联系方式:" prop="item.referralPhone">
  139. <el-input
  140. v-model="item.referralPhone"
  141. placeholder="请输入联系方式"
  142. clearable
  143. size="small"
  144. style="width: 153px"
  145. @keyup.enter.native="handleQuery"
  146. />
  147. </el-form-item>
  148. </div>
  149. <el-form-item label="引荐单位:" prop="configType">
  150. <el-select v-model="queryParams.configType" placeholder="系统内置" clearable size="small" style="width: 188px">
  151. <el-option
  152. v-for="dict in typeOptions"
  153. :key="dict.dictValue"
  154. :label="dict.dictLabel"
  155. :value="dict.dictValue"
  156. />
  157. </el-select>
  158. </el-form-item>
  159. <el-form-item label="投资分配额:" prop="investmentAllcocation">
  160. <el-input
  161. v-model="queryParams.investmentAllcocation"
  162. placeholder="输入数字"
  163. clearable
  164. size="small"
  165. style="width: 98px"
  166. @keyup.enter.native="handleQuery"
  167. />
  168. <span class="souu">%</span>
  169. </el-form-item>
  170. <el-form-item label="引荐方联系人:" prop="configName">
  171. <el-input
  172. v-model="queryParams.configName"
  173. placeholder="请输入"
  174. clearable
  175. size="small"
  176. style="width: 98px"
  177. @keyup.enter.native="handleQuery"
  178. />
  179. </el-form-item>
  180. <el-form-item label="引荐方联系方式:" prop="configName">
  181. <el-input
  182. v-model="queryParams.configName"
  183. placeholder="请输入联系方式"
  184. clearable
  185. size="small"
  186. style="width: 153px"
  187. @keyup.enter.native="handleQuery"
  188. />
  189. </el-form-item>
  190. <div class="nvestor">
  191. <p>项目基本信息 <i>*</i></p>
  192. </div>
  193. <el-form-item label="预计投资额" prop="needAmt">
  194. <el-input
  195. v-model="queryParams.needAmt"
  196. placeholder="请输入预计投资额"
  197. clearable
  198. size="small"
  199. style="width: 223px"
  200. @keyup.enter.native="handleQuery"
  201. />
  202. </el-form-item>
  203. <el-form-item label="其中 固定资产投资:" prop="fixedAssets" class="manager_lab" >
  204. <el-input
  205. v-model="queryParams.fixedAssets"
  206. placeholder="请输入"
  207. clearable
  208. size="small"
  209. style="width: 223px"
  210. @keyup.enter.native="handleQuery"
  211. />
  212. </el-form-item>
  213. <div class="lage_div">
  214. <span>项目主营产品</span>
  215. <el-form-item label="产品名称:" prop="productName" class="maneg_lar">
  216. <el-input
  217. v-model="queryParams.productName"
  218. placeholder="请输入产品名称"
  219. clearable
  220. size="small"
  221. style="width: 470px"
  222. @keyup.enter.native="handleQuery"
  223. />
  224. </el-form-item>
  225. </div>
  226. <el-form-item label="设计产能:" prop="productQty" class="manager_labtwo" >
  227. <el-input
  228. v-model="queryParams.productQty"
  229. placeholder="请输入设计产能"
  230. clearable
  231. size="small"
  232. style="width: 470px"
  233. @keyup.enter.native="handleQuery"
  234. />
  235. </el-form-item>
  236. <div class="lage_div">
  237. <span>项目预计收益</span>
  238. <el-form-item label="预计产值:" prop="productPrice" class="maneg_lar">
  239. <el-input
  240. v-model="queryParams.productPrice"
  241. placeholder="请输入预计产值"
  242. clearable
  243. size="small"
  244. style="width: 470px"
  245. @keyup.enter.native="handleQuery"
  246. />
  247. </el-form-item>
  248. </div>
  249. <el-form-item label="预计税收:" prop="productTax" class="manager_labtwo" >
  250. <el-input
  251. v-model="queryParams.productTax"
  252. placeholder="请输入预计税收"
  253. clearable
  254. size="small"
  255. style="width: 470px"
  256. @keyup.enter.native="handleQuery"
  257. />
  258. </el-form-item>
  259. <el-form-item label="预计用工:" prop="productEmp" class="manager_labtwo" >
  260. <el-input
  261. v-model="queryParams.productEmp"
  262. placeholder="请输入预计用工"
  263. clearable
  264. size="small"
  265. style="width: 470px"
  266. @keyup.enter.native="handleQuery"
  267. />
  268. </el-form-item>
  269. <div class="nvestor">
  270. <p>项目基本需求 </p>
  271. </div>
  272. <el-form-item label="项目计划用地:" prop="plannedLand" class="manager_labthre">
  273. <el-input
  274. v-model="queryParams.plannedLand"
  275. placeholder="请输入"
  276. clearable
  277. size="small"
  278. style="width: 207px"
  279. @keyup.enter.native="handleQuery"
  280. />
  281. <span class="souu">亩</span>
  282. </el-form-item>
  283. <el-form-item label="其中 独立供地:" prop="independentLand">
  284. <el-input
  285. v-model="queryParams.independentLand"
  286. placeholder="请输入"
  287. clearable
  288. size="small"
  289. style="width: 207px"
  290. @keyup.enter.native="handleQuery"
  291. />
  292. <span class="souu">亩</span>
  293. </el-form-item>
  294. <el-form-item label="流转土地:" prop="circulationLan" class="mage_ter">
  295. <el-input
  296. v-model="queryParams.circulationLan"
  297. placeholder="请输入"
  298. clearable
  299. size="small"
  300. style="width: 207px"
  301. @keyup.enter.native="handleQuery"
  302. />
  303. <span class="souu">亩</span>
  304. </el-form-item>
  305. <el-form-item label="项目计划租赁用房:" prop="needRoom" class="manager_labthre">
  306. <el-input
  307. v-model="queryParams.needRoom"
  308. placeholder="请输入"
  309. clearable
  310. size="small"
  311. style="width: 207px"
  312. @keyup.enter.native="handleQuery"
  313. />
  314. <span class="souu">亩</span>
  315. </el-form-item>
  316. <el-form-item label="其中 厂房:" prop="needFactoryRoom">
  317. <el-input
  318. v-model="queryParams.needFactoryRoom"
  319. placeholder="请输入"
  320. clearable
  321. size="small"
  322. style="width: 207px"
  323. @keyup.enter.native="handleQuery"
  324. />
  325. <span class="souu">亩</span>
  326. </el-form-item>
  327. <el-form-item label="办公生活用房:" prop="needBusRoom" class="mage_ter">
  328. <el-input
  329. v-model="queryParams.needBusRoom"
  330. placeholder="请输入"
  331. clearable
  332. size="small"
  333. style="width: 207px"
  334. @keyup.enter.native="handleQuery"
  335. />
  336. <span class="souu">亩</span>
  337. </el-form-item>
  338. <el-form-item label="其他需求:" prop="other" class="maget_ty">
  339. <el-input
  340. v-model="queryParams.other"
  341. placeholder="请输入项目概况"
  342. clearable
  343. type="textarea"
  344. size="small"
  345. style="width: 480px;height: 78px;"
  346. class="ieuyr"
  347. @keyup.enter.native="handleQuery"
  348. />
  349. </el-form-item>
  350. <el-form-item label="拟落户地点:" prop="address">
  351. <el-select v-model="queryParams.address" placeholder="系统内置" clearable size="small" style="width: 188px">
  352. <el-option
  353. v-for="dict in typeOptions"
  354. :key="dict.dictValue"
  355. :label="dict.dictLabel"
  356. :value="dict.dictValue"
  357. />
  358. </el-select>
  359. </el-form-item>
  360. <el-form-item label="是否签订框架协议:" prop="isFrameorder" class="maget_ty">
  361. <el-select v-model="queryParams.isFrameorder" placeholder="系统内置" clearable size="small" style="width: 298px">
  362. <el-option
  363. v-for="dict in typeOptions"
  364. :key="dict.dictValue"
  365. :label="dict.dictLabel"
  366. :value="dict.dictValue"
  367. />
  368. </el-select>
  369. </el-form-item>
  370. <el-form-item label="添加附件:" prop="configType" class="maget_ty">
  371. <div class="forieu" style="width: 618px;">
  372. <div class="bure burert">
  373. <el-upload
  374. action="http://192.168.101.11:8080/common/upload"
  375. :auto-upload="false"
  376. ref="upload"
  377. :before-upload="beforeAvatarUpload"
  378. list-type="picture-card"
  379. :on-preview="handlePictureCardPreview"
  380. :on-remove="handleRemove"
  381. :multiple="true"
  382. :file-list="fileList">
  383. <!-- <i slot="default" class="el-icon-plus"></i> -->
  384. <div class="ijeut">
  385. <el-button plain slot="trigger" size="small" type="primary" >选择图片</el-button>
  386. <!-- margin-top: 15%; transform: translateY(-50%); -->
  387. </div>
  388. <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
  389. </el-upload>
  390. <div class="ijeut"><el-button style="margin-left: 10px; height: 32px;" size="small" type="primary" @click="submitUpload">开始上传</el-button></div>
  391. </div>
  392. </div>
  393. </el-form-item>
  394. <el-form-item label="备注:" prop="description" class="maget_ty">
  395. <el-input
  396. v-model="queryParams.description"
  397. placeholder="请输入备注"
  398. clearable
  399. type="textarea"
  400. size="small"
  401. style="width: 480px;height: 78px;"
  402. class="ieuyr"
  403. @keyup.enter.native="handleQuery"
  404. />
  405. </el-form-item>
  406. </el-form>
  407. </div>
  408. <!-- </div> -->
  409. <!-- 添加或修改参数配置对话框 -->
  410. <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
  411. <el-form ref="form" :model="form" :rules="rules" label-width="150px">
  412. <el-form-item label="企业名称" prop="companyName">
  413. <el-input v-model="form.companyName" placeholder="请输入企业名称" />
  414. </el-form-item>
  415. <el-form-item label="企业所在地" prop="companyAddress">
  416. <el-input v-model="form.companyAddress" placeholder="请输入参数键名" />
  417. </el-form-item>
  418. <el-form-item label="法人代表姓名" prop="companyLegal">
  419. <el-input v-model="form.companyLegal" placeholder="请输入参数键值" />
  420. </el-form-item>
  421. <el-form-item label="系统内置" prop="configType">
  422. <el-radio-group v-model="form.configType">
  423. <el-radio
  424. v-for="dict in typeOptions"
  425. :key="dict.dictValue"
  426. :label="dict.dictValue"
  427. >{{dict.dictLabel}}</el-radio>
  428. </el-radio-group>
  429. </el-form-item>
  430. <el-form-item label="统一社会信用代码" prop="companyCode">
  431. <el-input v-model="form.companyCode" placeholder="请输入统一社会信用代码" />
  432. </el-form-item>
  433. <el-form-item label="联系方式" prop="phone">
  434. <el-input v-model="form.phone" placeholder="请输入联系方式" />
  435. </el-form-item>
  436. </el-form>
  437. <div slot="footer" class="dialog-footer">
  438. <el-button type="primary" @click="submitForm">确 定</el-button>
  439. <el-button @click="cancel">取 消</el-button>
  440. </div>
  441. </el-dialog>
  442. <el-dialog :title="titletwo" :visible.sync="opentwo" width="800px" append-to-body>
  443. <el-form ref="formtwo" :model="form" :rules="rules" label-width="150px">
  444. <el-form-item label="姓名" prop="name">
  445. <el-input v-model="formtwo.name" placeholder="请输入企业名称" />
  446. </el-form-item>
  447. <el-form-item label="自然人所在地" prop="address">
  448. <el-input v-model="formtwo.address" placeholder="请输入参数键名" />
  449. </el-form-item>
  450. <el-form-item label="身份证号码" prop="idCode">
  451. <el-input v-model="formtwo.idCode" placeholder="请输入参数键值" />
  452. </el-form-item>
  453. <el-form-item label="系统内置" prop="configType">
  454. <el-radio-group v-model="form.configType">
  455. <el-radio
  456. v-for="dict in typeOptions"
  457. :key="dict.dictValue"
  458. :label="dict.dictValue"
  459. >{{dict.dictLabel}}</el-radio>
  460. </el-radio-group>
  461. </el-form-item>
  462. <el-form-item label="联系方式" prop="phone">
  463. <el-input v-model="formtwo.phone" placeholder="请输入联系方式" />
  464. </el-form-item>
  465. </el-form>
  466. <div slot="footer" class="dialog-footer">
  467. <el-button type="primary" @click="submitFormtwo">确 定</el-button>
  468. <el-button @click="cancel">取 消</el-button>
  469. </div>
  470. </el-dialog>
  471. <el-dialog :visible.sync="dialogVisible">
  472. <img width="100%" :src="dialogImageUrl" alt="">
  473. </el-dialog>
  474. </div>
  475. </template>
  476. <script>
  477. import { listConfig, listConfigtwo, listConfigthert, listConfigfour, getConfig, getConfigKeytwo, delConfig, delConfigtwo, addConfig, addConfigtwo, updateConfig, updateConfigtwo, exportConfig, clearCache } from "@/api/system/config";
  478. export default {
  479. name: "Config",
  480. props:{
  481. queryParams: Object,
  482. tabIndex: Number
  483. },
  484. data() {
  485. return {
  486. // 遮罩层
  487. loading: true,
  488. //步骤条
  489. naueactive:2,
  490. tab:1,
  491. tabNume:['线索信息','签约信息','在建信息','投产信息'],
  492. // 选中数组
  493. ids: [],
  494. // 非单个禁用
  495. single: true,
  496. // 非多个禁用
  497. multiple: true,
  498. // 显示搜索条件
  499. showSearch: true,
  500. // 总条数
  501. total: 0,
  502. // 参数表格数据
  503. configList: [],
  504. configListtwoL:[],
  505. // 弹出层标题
  506. title: "",
  507. titletwo:'',
  508. // 是否显示弹出层
  509. open: false,
  510. opentwo:false,
  511. // 类型数据字典
  512. typeOptions: [],
  513. // 日期范围
  514. dateRange: [],
  515. // 查询参数
  516. // queryParams: {
  517. // pageNum: 14,
  518. // pageSize: 10,
  519. // configName: undefined,
  520. // configKey: undefined,
  521. // configType: undefined
  522. // },
  523. dialogImageUrl: '',
  524. dialogVisible: false,
  525. disabled: false,
  526. bmProjectId:0,
  527. // 表单参数
  528. form: {},
  529. formtwo:{},
  530. fileList:[],
  531. // 表单校验
  532. rules: {
  533. configName: [
  534. { required: true, message: "参数名称不能为空", trigger: "blur" }
  535. ],
  536. configKey: [
  537. { required: true, message: "参数键名不能为空", trigger: "blur" }
  538. ],
  539. configValue: [
  540. { required: true, message: "参数键值不能为空", trigger: "blur" }
  541. ]
  542. }
  543. };
  544. },
  545. created() {
  546. this.bmProjectId = this.$route.query.setid
  547. console.log(this.bmProjectId)
  548. this.getList();
  549. this.getListtwo();
  550. this.getListther();
  551. this.getDicts("sys_yes_no").then(response => {
  552. this.typeOptions = response.data;
  553. });
  554. console.log( this.queryParams)
  555. },
  556. methods: {
  557. submitUpload() {
  558. this.$refs.upload.submit();
  559. },
  560. handleRemove(file) {
  561. console.log(file,87);
  562. },
  563. handlePictureCardPreview(file) {
  564. this.dialogImageUrl = file.url;
  565. this.dialogVisible = true;
  566. },
  567. handleDownload(file) {
  568. console.log(file);
  569. },
  570. beforeAvatarUpload(file) {
  571. console.log(file.type)
  572. const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';
  573. const isPNG = file.type === 'image/png';
  574. const isLt2M = file.size / 1024 / 1024 < 2;
  575. if (!isJPG) {
  576. this.$message.error('图片只能是 JPG 格式! 或者 PNG 格式!');
  577. }
  578. // if(!isPNG){
  579. // this.$message.error('图片只能是 JPG 格式! 或者 PNG 格式!');
  580. // }
  581. if (!isLt2M) {
  582. this.$message.error('图片大小不能超过 2MB!');
  583. }
  584. return isJPG && isLt2M;
  585. },
  586. /** 查询参数列表 */
  587. getList() {
  588. this.loading = true;
  589. listConfigtwo(this.bmProjectId).then(response => {
  590. console.log(response)
  591. this.queryParams = response.data;
  592. // this.fileList = this.queryParams.attachment
  593. // this.total = response.total;
  594. this.loading = false;
  595. }
  596. );
  597. },
  598. //企业列表
  599. getListtwo() {
  600. this.loading = true;
  601. listConfigthert().then(response => {
  602. console.log(response)
  603. this.configList = response.rows;
  604. // this.fileList = this.queryParams.attachment
  605. // this.total = response.total;
  606. this.loading = false;
  607. }
  608. );
  609. },
  610. //自然人列表
  611. getListther() {
  612. this.loading = true;
  613. listConfigfour(this.bmProjectId).then(response => {
  614. console.log(response)
  615. this.configListtwoL = response.rows;
  616. // this.fileList = this.queryParams.attachment
  617. // this.total = response.total;
  618. this.loading = false;
  619. }
  620. );
  621. },
  622. // 参数系统内置字典翻译
  623. typeFormat(row, column) {
  624. return this.selectDictLabel(this.typeOptions, row.configType);
  625. },
  626. // 取消按钮
  627. cancel() {
  628. this.open = false;
  629. this.opentwo = false
  630. this.reset();
  631. },
  632. // 表单重置
  633. reset() {
  634. this.form = {
  635. // configId: undefined,
  636. // configName: undefined,
  637. // configKey: undefined,
  638. // configValue: undefined,
  639. // configType: "Y",
  640. // remark: undefined
  641. };
  642. this.resetForm("form");
  643. },
  644. resettwo() {
  645. this.formtwo = {
  646. // configId: undefined,
  647. // configName: undefined,
  648. // configKey: undefined,
  649. // configValue: undefined,
  650. // configType: "Y",
  651. // remark: undefined
  652. };
  653. this.resetForm("form");
  654. },
  655. /** 搜索按钮操作 */
  656. handleQuery() {
  657. this.queryParams.pageNum = 1;
  658. this.getList();
  659. },
  660. /** 重置按钮操作 */
  661. resetQuery() {
  662. this.dateRange = [];
  663. this.resetForm("queryForm");
  664. this.handleQuery();
  665. },
  666. /** 新增按钮操作 */
  667. handleAdd() {
  668. this.reset();
  669. this.open = true;
  670. this.opentwo = true
  671. this.title = "添加参数";
  672. this.titletwo = "添加参数";
  673. },
  674. handleAddtwo() {
  675. this.resettwo();
  676. // this.open = true;
  677. this.opentwo = true
  678. // this.title = "添加参数";
  679. this.titletwo = "添加参数";
  680. },
  681. // 多选框选中数据
  682. handleSelectionChange(selection) {
  683. this.ids = selection.map(item => item.configId)
  684. this.single = selection.length!=1
  685. this.multiple = !selection.length
  686. },
  687. /** 修改按钮操作 */
  688. handleUpdate(row) {
  689. this.reset();
  690. const id = row.id
  691. getConfig(id).then(response => {
  692. console.log(345)
  693. this.form = response.data;
  694. this.open = true;
  695. // this.opentwo = true
  696. this.title = "修改参数";
  697. // this.titletwo = "修改参数";
  698. });
  699. },
  700. handleUpdatetwo(row) {
  701. this.reset();
  702. const id = row.id
  703. getConfigKeytwo(id).then(response => {
  704. console.log(345)
  705. this.formtwo = response.data;
  706. // this.open = true;
  707. this.opentwo = true
  708. // this.title = "修改参数";
  709. this.titletwo = "修改参数";
  710. });
  711. },
  712. /** 提交按钮 */
  713. submitForm: function() {
  714. this.$refs["form"].validate(valid => {
  715. if (valid) {
  716. if (this.form.id != undefined) {
  717. updateConfig(this.form).then(response => {
  718. this.msgSuccess("修改成功");
  719. this.open = false;
  720. this.getListtwo();
  721. });
  722. } else {
  723. this.form.bmProjectId = this.bmProjectId
  724. addConfig(this.form).then(response => {
  725. this.msgSuccess("新增成功");
  726. this.open = false;
  727. this.getListtwo();
  728. });
  729. }
  730. }
  731. });
  732. },
  733. /** 提交按钮 */
  734. submitFormtwo: function() {
  735. this.$refs["formtwo"].validate(valid => {
  736. if (valid) {
  737. if (this.formtwo.id != undefined) {
  738. updateConfigtwo(this.formtwo).then(response => {
  739. this.msgSuccess("修改成功");
  740. this.opentwo = false;
  741. this.getListther();
  742. });
  743. } else {
  744. this.formtwo.bmProjectId = this.bmProjectId
  745. addConfigtwo(this.formtwo).then(response => {
  746. this.msgSuccess("新增成功");
  747. this.opentwo = false;
  748. this.getListther();
  749. });
  750. }
  751. }
  752. });
  753. },
  754. /** 删除按钮操作 */
  755. handleDelete(row) {
  756. const configIds = row.id ;
  757. this.$confirm('是否确认删除"' + row.companyName + '"的数据项?', "警告", {
  758. confirmButtonText: "确定",
  759. cancelButtonText: "取消",
  760. type: "warning"
  761. }).then(function() {
  762. return delConfig(configIds);
  763. }).then(() => {
  764. this.getListtwo();
  765. this.msgSuccess("删除成功");
  766. })
  767. },
  768. handleDeletetwo(row) {
  769. const configIds = row.id ;
  770. this.$confirm('是否确认删除"' + row.name + '"的数据项?', "警告", {
  771. confirmButtonText: "确定",
  772. cancelButtonText: "取消",
  773. type: "warning"
  774. }).then(function() {
  775. return delConfigtwo(configIds);
  776. }).then(() => {
  777. this.getListther();
  778. this.msgSuccess("删除成功");
  779. })
  780. },
  781. /** 导出按钮操作 */
  782. handleExport() {
  783. const queryParams = this.queryParams;
  784. this.$confirm('是否确认导出所有参数数据项?', "警告", {
  785. confirmButtonText: "确定",
  786. cancelButtonText: "取消",
  787. type: "warning"
  788. }).then(function() {
  789. return exportConfig(queryParams);
  790. }).then(response => {
  791. this.download(response.msg);
  792. })
  793. },
  794. /** 清理缓存按钮操作 */
  795. handleClearCache() {
  796. clearCache().then(response => {
  797. this.msgSuccess("清理成功");
  798. });
  799. },
  800. //tab
  801. changeTab(index){
  802. this.$emit('changeTab', index)
  803. // this.tab = index
  804. }
  805. }
  806. };
  807. </script>
  808. <style rel="stylesheet/scss" lang="scss">
  809. .manager_form{
  810. .manager_lab{
  811. .el-form-item__label{
  812. width: 145px !important;
  813. }
  814. }
  815. .maneg_lar{
  816. position: relative;
  817. .el-form-item__label{
  818. width: 134px !important;
  819. }
  820. span{
  821. position: absolute;
  822. left: -95%;
  823. }
  824. }
  825. .manager_labtwo{
  826. .el-form-item__label{
  827. width: 244px !important;
  828. }
  829. }
  830. .manager_labthre{
  831. // .el-form-item{
  832. .el-form-item__label{
  833. width: 130px !important;
  834. }
  835. margin-right: 40px !important;
  836. // }
  837. }
  838. .ieuyr{
  839. .el-textarea__inner{
  840. height: 80px !important;
  841. }
  842. }
  843. .mage_ter{
  844. .el-form-item__label{
  845. width: 513px !important;
  846. }
  847. }
  848. .maget_ty{
  849. .el-form-item__label{
  850. width: 135px !important;
  851. }
  852. }
  853. .forieu{
  854. border: 1px solid #DCDFE6;
  855. border-radius: 4px;
  856. width: 480px;
  857. height: 90px;
  858. position: relative;
  859. .bure{
  860. position: absolute;
  861. right: 20px;
  862. top: 50%;
  863. transform: translateY(-50%);
  864. }
  865. .burert{
  866. .el-upload--picture-card{
  867. height: 78px;
  868. line-height: 78px;
  869. width: 80px;
  870. vertical-align:center;
  871. border: 0 !important;
  872. background-color: #fff;
  873. }
  874. .el-upload-list--picture-card .el-upload-list__item{
  875. height: 78px !important;
  876. width: 78px !important;
  877. }
  878. }
  879. }
  880. }
  881. .lage_div{
  882. padding-left: 15px;
  883. display: flex;
  884. align-items: center;
  885. margin-bottom: 22px;
  886. .el-form-item{
  887. margin-bottom: 0 !important;
  888. }
  889. }
  890. .app-cont{
  891. .header{
  892. padding-left: 22px;
  893. height: 45px;
  894. line-height: 40px;
  895. background-color: #F1F1F1;
  896. font-size: 18px;
  897. color: #343434;
  898. margin-bottom: 40px;
  899. }
  900. // .naue{
  901. // border: 1px solid #DADADA;
  902. // padding: 20px;
  903. // margin-top: 40px;
  904. .nuae_wtu{
  905. display: flex;
  906. justify-content: center;
  907. align-content: center;
  908. .naue_one{
  909. width: 30%;
  910. p{
  911. font-size: 12px;
  912. font-family: PingFang SC;
  913. font-weight: 400;
  914. color: #343434;
  915. }
  916. .naue_name{
  917. font-size: 14px;
  918. font-family: PingFang SC;
  919. font-weight: bold;
  920. color: #0669B2;
  921. margin-bottom: 30px;
  922. }
  923. }
  924. .naue_two{
  925. flex: 1;
  926. padding-top: 20px;
  927. // display: flex;
  928. // align-items: center;
  929. // justify-content: center;
  930. }
  931. }
  932. //tab
  933. .naue_tab{
  934. border-bottom: 1px solid #CDCDCD;
  935. display: flex;
  936. margin-top: 30px;
  937. padding: 0 10px;
  938. margin-bottom: 30px;
  939. p{
  940. font-size: 12px;
  941. font-family: PingFang SC;
  942. font-weight: 400;
  943. color: #343434;
  944. padding: 11px 15px;
  945. margin: 0;
  946. }
  947. .p{
  948. border-bottom: 2px solid #1C84C6;
  949. margin-bottom: -1px;
  950. }
  951. }
  952. .mation{
  953. .enterprise{
  954. font-size: 14px;
  955. font-family: PingFang SC;
  956. font-weight: bold;
  957. color: #1C84C6;
  958. margin-top: 25px;
  959. margin-bottom: 20px;
  960. }
  961. .enterprise_tw{
  962. i{
  963. margin-right: 5px;
  964. }
  965. font-size: 14px;
  966. font-family: PingFang SC;
  967. font-weight: 600;
  968. color: #666666;
  969. }
  970. }
  971. // }
  972. .nvestor{
  973. margin-bottom: 10px;
  974. p{
  975. margin:0;
  976. font-size: 14px;
  977. font-family: PingFang SC;
  978. font-weight: bold;
  979. color: #343434;
  980. height: 24px;
  981. line-height: 24px;
  982. border-left: 3px solid #1C84C6;
  983. padding-left: 13px;
  984. i{
  985. color: red;
  986. }
  987. }
  988. }
  989. .souu{
  990. font-size: 14px;
  991. font-family: PingFang SC;
  992. font-weight: 400;
  993. color: #343434;
  994. margin-left: 5px;
  995. }
  996. }
  997. //在建项目
  998. .nstruction{
  999. display: flex;
  1000. align-items: center;
  1001. .nstruction_nav{
  1002. display: flex;
  1003. align-items: center;
  1004. p:nth-child(1){
  1005. margin-right: 10px;
  1006. span{
  1007. font-size: 14px;
  1008. font-family: PingFang SC;
  1009. font-weight: bold;
  1010. color: #343434;
  1011. }
  1012. span:nth-child(1){
  1013. color: #DF0024;
  1014. }
  1015. }
  1016. p:nth-child(2){
  1017. width: 233px;
  1018. height: 30px;
  1019. line-height: 30px;
  1020. border: 1px solid #CDCDCD;
  1021. border-radius: 3px;
  1022. padding-left: 14px;
  1023. }
  1024. }
  1025. .nstruction_navne{
  1026. margin-left: 50px;
  1027. display: flex;
  1028. align-items: center;
  1029. p:nth-child(1){
  1030. margin-right: 10px;
  1031. span{
  1032. font-size: 14px;
  1033. font-family: PingFang SC;
  1034. font-weight: bold;
  1035. color: #343434;
  1036. }
  1037. span:nth-child(1){
  1038. color: #DF0024;
  1039. }
  1040. }
  1041. p:nth-child(2){
  1042. width: 233px;
  1043. height: 30px;
  1044. line-height: 30px;
  1045. border: 1px solid #CDCDCD;
  1046. border-radius: 3px;
  1047. padding-left: 14px;
  1048. }
  1049. }
  1050. }
  1051. .kaieu{
  1052. padding-left: 60px;
  1053. font-size: 14px;
  1054. font-family: PingFang SC;
  1055. font-weight: 800;
  1056. color: #343434;
  1057. }
  1058. .kaieu_tw{
  1059. padding-left: 60px;
  1060. font-size: 14px;
  1061. font-family: PingFang SC;
  1062. font-weight: 500;
  1063. color: #666666;
  1064. }
  1065. </style>