taskFillIn.vue 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242
  1. <template>
  2. <div class="audit-task-manage-container" style="padding: 20px">
  3. <!-- 页面标题 -->
  4. <div class="page-header">
  5. <!-- <h2>{{ pageTitle }}</h2> -->
  6. </div>
  7. <!-- 操作按钮 -->
  8. <div class="action-buttons" style="margin-bottom: 20px">
  9. <el-button
  10. type="primary"
  11. :loading="loading.submit"
  12. :disabled="isViewMode"
  13. @click="handleSubmit"
  14. >
  15. 提交
  16. </el-button>
  17. <!-- <el-button type="primary" :loading="loading.save" @click="handleSave" :disabled="isViewMode">
  18. 保存
  19. </el-button> -->
  20. <el-button type="primary" class="ml10" @click="handleBack">
  21. 返回
  22. </el-button>
  23. </div>
  24. <!-- 标签页容器 -->
  25. <div class="tabs-container">
  26. <el-tabs
  27. v-model="activeTab"
  28. type="border-card"
  29. @tab-click="handleTabClick"
  30. >
  31. <!-- 立项信息 -->
  32. <el-tab-pane label="立项信息" name="projectInfo">
  33. <el-form
  34. :model="formData.basicInfo"
  35. label-width="180px"
  36. :disabled="true"
  37. >
  38. <el-form-item label="成本监审项目名称:">
  39. <el-input
  40. v-model="formData.basicInfo.projectName"
  41. placeholder="请输入成本监审项目名称"
  42. style="width: 400px"
  43. :disabled="isViewMode"
  44. ></el-input>
  45. </el-form-item>
  46. <el-form-item label="关联成本监审目录:">
  47. <CatalogCascader
  48. ref="catalogCascader"
  49. :form-item="{ placeholder: '请选择监审目录' }"
  50. style="width: 100%"
  51. :value="formData.basicInfo.catalogId"
  52. :disabled="isViewMode"
  53. @change="handleCatalogChange"
  54. />
  55. </el-form-item>
  56. <el-form-item label="监审地区:">
  57. <RegionSelector
  58. :initial-area-code="formData.basicInfo.areaCode"
  59. :disabled="isViewMode"
  60. @region-change="handleRegionChange"
  61. ></RegionSelector>
  62. </el-form-item>
  63. <el-form-item label="被监审单位:">
  64. <el-select
  65. v-if="formData.basicInfo.auditUnitId"
  66. v-model="formData.basicInfo.auditUnitId"
  67. placeholder="请选择单位"
  68. clearable
  69. multiple
  70. style="width: 100%"
  71. :disabled="isViewMode"
  72. >
  73. <el-option
  74. v-for="unit in unitList"
  75. :key="unit.unitId"
  76. :label="unit.unitName"
  77. :value="unit.unitId"
  78. />
  79. </el-select>
  80. <el-input
  81. v-else
  82. v-model="formData.basicInfo.auditUnitName"
  83. placeholder="请输入单位"
  84. style="width: 100%"
  85. :disabled="isViewMode"
  86. ></el-input>
  87. </el-form-item>
  88. <el-form-item label="监审主体:">
  89. <el-select
  90. v-model="formData.basicInfo.orgId"
  91. placeholder="请选择监审主体"
  92. style="width: 100%"
  93. clearable
  94. :disabled="isViewMode"
  95. >
  96. <el-option
  97. v-for="Org in OrgList"
  98. :key="Org.id"
  99. :label="Org.name"
  100. :value="Org.id"
  101. />
  102. </el-select>
  103. </el-form-item>
  104. <el-form-item label="归属年度:">
  105. <el-date-picker
  106. v-model="formData.basicInfo.projectYear"
  107. style="width: 100%"
  108. type="year"
  109. placeholder="请选择归属年度"
  110. format="yyyy"
  111. value-format="yyyy"
  112. clearable
  113. :disabled="isViewMode"
  114. ></el-date-picker>
  115. </el-form-item>
  116. <el-form-item label="立项来源:">
  117. <el-select
  118. v-model="formData.basicInfo.sourceType"
  119. placeholder="请选择立项类型"
  120. style="width: 100%"
  121. :disabled="isViewMode"
  122. >
  123. <el-option
  124. v-for="item in dictData['projectProposal']"
  125. :key="item.key"
  126. :label="item.name"
  127. :value="item.key"
  128. ></el-option>
  129. </el-select>
  130. </el-form-item>
  131. <el-form-item label="监审形式:">
  132. <el-select
  133. v-model="formData.basicInfo.auditType"
  134. placeholder="请选择监审形式"
  135. style="width: 100%"
  136. :disabled="isViewMode"
  137. >
  138. <el-option
  139. v-for="item in dictData['auditType']"
  140. :key="item.key"
  141. :label="item.name"
  142. :value="item.key"
  143. ></el-option>
  144. </el-select>
  145. </el-form-item>
  146. <el-form-item label="监审期间:">
  147. <div class="cost-period-container">
  148. <el-button
  149. type="primary"
  150. size="small"
  151. class="add-cost-year-btn"
  152. :disabled="isViewMode || true"
  153. @click="addCostYear"
  154. >
  155. +
  156. </el-button>
  157. <div class="cost-years-wrapper">
  158. <div
  159. v-for="(year, index) in formData.basicInfo.auditPeriodArray"
  160. :key="index"
  161. class="cost-year-item"
  162. >
  163. <el-date-picker
  164. v-model="year.value"
  165. style="width: 82%"
  166. type="year"
  167. placeholder="请选择年份"
  168. format="yyyy"
  169. value-format="yyyy"
  170. clearable
  171. :disabled="isViewMode"
  172. ></el-date-picker>
  173. <el-button
  174. type="danger"
  175. size="small"
  176. class="delete-cost-year-btn"
  177. :disabled="isViewMode || true"
  178. @click="deleteCostYear(index)"
  179. >
  180. 删除
  181. </el-button>
  182. </div>
  183. </div>
  184. </div>
  185. </el-form-item>
  186. <el-form-item label="是否参加听证:">
  187. <el-radio-group
  188. v-model="formData.basicInfo.needHearing"
  189. :disabled="isViewMode"
  190. >
  191. <el-radio :label="0">是</el-radio>
  192. <el-radio :label="1">否</el-radio>
  193. </el-radio-group>
  194. </el-form-item>
  195. <el-form-item label="是否应急项目:">
  196. <el-radio-group
  197. v-model="formData.basicInfo.isEmergency"
  198. :disabled="isViewMode"
  199. >
  200. <el-radio :label="0">是</el-radio>
  201. <el-radio :label="1">否</el-radio>
  202. </el-radio-group>
  203. </el-form-item>
  204. <el-form-item label="立项理由:">
  205. <el-input
  206. v-model="formData.basicInfo.establishmentReason"
  207. style="width: 100%"
  208. type="textarea"
  209. rows="4"
  210. placeholder="请输入立项理由"
  211. :disabled="isViewMode"
  212. ></el-input>
  213. </el-form-item>
  214. <el-form-item label="监审任务负责人:">
  215. <el-select
  216. v-model="formData.basicInfo.auditGroup"
  217. placeholder="请选择负责人"
  218. style="width: 100%"
  219. :disabled="isViewMode"
  220. >
  221. <el-option
  222. v-for="(item, index) in userList"
  223. :key="index"
  224. :label="item.fullname"
  225. :value="item.userId"
  226. ></el-option>
  227. </el-select>
  228. </el-form-item>
  229. <el-form-item label="监审任务组成员:">
  230. <el-select
  231. v-model="formData.basicInfo.auditTeamMembers"
  232. placeholder="请选择成员"
  233. multiple
  234. style="width: 100%"
  235. :disabled="isViewMode"
  236. >
  237. <el-option
  238. v-for="(item, index) in userList"
  239. :key="index"
  240. :label="item.fullname"
  241. :value="item.userId"
  242. ></el-option>
  243. </el-select>
  244. </el-form-item>
  245. <el-form-item label="其他专家:">
  246. <el-input
  247. v-model="formData.basicInfo.expertStr"
  248. placeholder="请输入其他专家"
  249. style="width: 100%"
  250. :disabled="isViewMode"
  251. ></el-input>
  252. </el-form-item>
  253. <el-form-item label="预定的监审工作起止时间:">
  254. <el-date-picker
  255. v-model="formData.basicInfo.plannedAuditStartDate"
  256. type="date"
  257. placeholder="开始日期"
  258. format="yyyy-MM-dd"
  259. value-format="yyyy-MM-dd"
  260. style="width: 150px"
  261. :disabled="isViewMode"
  262. ></el-date-picker>
  263. <span style="margin: 0 10px">—</span>
  264. <el-date-picker
  265. v-model="formData.basicInfo.plannedAuditEndDate"
  266. type="date"
  267. placeholder="结束日期"
  268. format="yyyy-MM-dd"
  269. value-format="yyyy-MM-dd"
  270. style="width: 150px"
  271. :disabled="isViewMode"
  272. ></el-date-picker>
  273. </el-form-item>
  274. </el-form>
  275. </el-tab-pane>
  276. <!-- 监审文书 -->
  277. <el-tab-pane label="监审文书" name="auditDocument">
  278. <div style="font-size: 18px">
  279. <strong>说明:</strong>
  280. 被监审单位接收《送达回证》后需签名并反馈监审主体。
  281. </div>
  282. <el-table
  283. style="width: 100%; margin-top: 20px"
  284. border
  285. :data="formData.auditDocument"
  286. >
  287. <el-table-column prop="id" label="序号" width="120" align="center">
  288. <template slot-scope="scope">
  289. {{ scope.$index + 1 }}
  290. </template>
  291. </el-table-column>
  292. <el-table-column
  293. prop="name"
  294. label="文书类型"
  295. min-width="150"
  296. align="center"
  297. ></el-table-column>
  298. <el-table-column
  299. prop="province"
  300. label="文书文号"
  301. min-width="230"
  302. align="center"
  303. ></el-table-column>
  304. <el-table-column
  305. prop="city"
  306. label="推送时间"
  307. min-width="230"
  308. align="center"
  309. ></el-table-column>
  310. <el-table-column
  311. prop="address"
  312. label="文书操作"
  313. min-width="150"
  314. align="center"
  315. >
  316. <template slot-scope="scope">
  317. <el-button
  318. type="text"
  319. size="small"
  320. :disabled="isViewMode"
  321. @click="handleClick(scope.row)"
  322. >
  323. 查看
  324. </el-button>
  325. <el-button
  326. type="text"
  327. size="small"
  328. :disabled="isViewMode"
  329. @click="handleDownload(scope.row)"
  330. >
  331. 下载
  332. </el-button>
  333. </template>
  334. </el-table-column>
  335. <el-table-column
  336. prop="zip"
  337. label="向监审主体反馈文件"
  338. min-width="200"
  339. align="center"
  340. >
  341. <template slot-scope="scope">
  342. <el-button
  343. type="text"
  344. size="small"
  345. :disabled="isViewMode"
  346. @click="handleUpload(scope.row)"
  347. >
  348. 上传附件
  349. </el-button>
  350. <el-button
  351. type="text"
  352. size="small"
  353. :disabled="isViewMode"
  354. @click="handleClick(scope.row)"
  355. >
  356. 查看附件
  357. </el-button>
  358. </template>
  359. </el-table-column>
  360. </el-table>
  361. </el-tab-pane>
  362. <!-- 报送资料 -->
  363. <!-- <el-tab-pane label="报送资料" name="dataRequirements"></el-tab-pane> -->
  364. <el-tab-pane label="报送资料" name="dataRequirements">
  365. <el-button
  366. type="primary"
  367. :disabled="isViewMode"
  368. @click="handleAddMaterial"
  369. >
  370. 补充材料
  371. </el-button>
  372. <el-table
  373. style="margin-top: 20px"
  374. border
  375. :data="groupedDataRequirements"
  376. size="mini"
  377. :show-header="true"
  378. :row-class-name="getRowClassName"
  379. >
  380. <el-table-column prop="seq" label="序号" width="80" align="center">
  381. <template slot-scope="scope">
  382. <span v-if="!scope.row.isCategoryHeader">
  383. {{ scope.row.seq || scope.row.index }}
  384. </span>
  385. </template>
  386. </el-table-column>
  387. <el-table-column
  388. prop="informationName"
  389. label="报送资料"
  390. min-width="280"
  391. >
  392. <template slot-scope="scope">
  393. <div
  394. v-if="scope.row.isCategoryHeader"
  395. class="category-header-cell"
  396. >
  397. {{ scope.row.categoryName }}
  398. </div>
  399. <span v-else>{{ scope.row.informationName || '-' }}</span>
  400. </template>
  401. </el-table-column>
  402. <el-table-column
  403. prop="formatRequired"
  404. label="资料类型"
  405. width="130"
  406. align="center"
  407. >
  408. <template slot-scope="scope">
  409. <span v-if="!scope.row.isCategoryHeader">
  410. <span
  411. v-if="
  412. scope.row.formatRequired !== null &&
  413. scope.row.formatRequired !== undefined
  414. "
  415. >
  416. {{
  417. getDictName(
  418. 'formatAsk',
  419. String(scope.row.formatRequired)
  420. ) || scope.row.formatRequired
  421. }}
  422. </span>
  423. <span v-else>-</span>
  424. </span>
  425. </template>
  426. </el-table-column>
  427. <el-table-column
  428. prop="isRequired"
  429. label="是否必填"
  430. width="110"
  431. align="center"
  432. >
  433. <template slot-scope="scope">
  434. <span v-if="!scope.row.isCategoryHeader">
  435. {{ scope.row.isRequired === '1' ? '是' : '否' }}
  436. </span>
  437. </template>
  438. </el-table-column>
  439. <el-table-column
  440. prop="isUploaded"
  441. label="是否上传"
  442. width="110"
  443. align="center"
  444. >
  445. <template slot-scope="scope">
  446. <span v-if="!scope.row.isCategoryHeader">
  447. <span v-if="scope.row.isUploaded === true">已上传</span>
  448. <span v-else class="text-danger">未上传</span>
  449. </span>
  450. </template>
  451. </el-table-column>
  452. <el-table-column
  453. prop="operation"
  454. label="操作"
  455. width="220"
  456. align="center"
  457. >
  458. <template slot-scope="scope">
  459. <template v-if="!scope.row.isCategoryHeader">
  460. <template v-if="scope.row.formatRequired !== '3'">
  461. <el-button
  462. type="text"
  463. size="small"
  464. :disabled="isViewMode"
  465. @click="handleFileView(scope.row)"
  466. >
  467. 查看
  468. </el-button>
  469. <el-button
  470. type="text"
  471. size="small"
  472. :disabled="isViewMode"
  473. @click="handleFileDownload(scope.row)"
  474. >
  475. 下载
  476. </el-button>
  477. <el-button
  478. v-if="scope.row.isUploaded === false"
  479. type="text"
  480. size="small"
  481. :disabled="isViewMode"
  482. @click="handleFileUpload(scope.row)"
  483. >
  484. 上传
  485. </el-button>
  486. </template>
  487. <template v-if="scope.row.formatRequired == '3'">
  488. <el-button
  489. type="text"
  490. size="small"
  491. :disabled="isViewMode"
  492. @click="handleTemplateDownload(scope.row)"
  493. >
  494. 模版下载
  495. </el-button>
  496. <el-button
  497. v-if="scope.row.isUploaded === false"
  498. type="text"
  499. size="small"
  500. :disabled="isViewMode"
  501. @click="handleDataUpload(scope.row)"
  502. >
  503. 数据上传
  504. </el-button>
  505. <!-- <template v-else>
  506. <el-button
  507. type="text"
  508. size="small"
  509. @click="handleFileUpload(scope.row)"
  510. >
  511. 上传
  512. </el-button>
  513. </template> -->
  514. </template>
  515. </template>
  516. </template>
  517. </el-table-column>
  518. </el-table>
  519. </el-tab-pane>
  520. <!-- 成本调查表 -->
  521. <el-tab-pane label="成本调查表" name="costSurvey">
  522. <el-table
  523. style="width: 100%; margin-top: 20px"
  524. :data="paginatedCostSurveyData"
  525. border
  526. size="medium"
  527. >
  528. <!-- 序号列 -->
  529. <el-table-column
  530. prop="index"
  531. label="序号"
  532. width="60"
  533. align="center"
  534. ></el-table-column>
  535. <el-table-column label="成本调查表" min-width="220">
  536. <template slot-scope="scope">
  537. <span
  538. :style="{
  539. color: scope.row.isDisabled ? '#909399' : '#409EFF',
  540. cursor: scope.row.isDisabled ? 'default' : 'pointer',
  541. }"
  542. @click="!scope.row.isDisabled && handleSurveyClick(scope.row)"
  543. >
  544. {{ scope.row.name }}
  545. </span>
  546. </template>
  547. </el-table-column>
  548. <!-- 资料类型列 -->
  549. <el-table-column
  550. prop="dataType"
  551. label="资料类型"
  552. width="120"
  553. align="center"
  554. ></el-table-column>
  555. <!-- 表格类型列 -->
  556. <el-table-column
  557. prop="tableType"
  558. label="表格类型"
  559. width="120"
  560. align="center"
  561. ></el-table-column>
  562. <!-- 是否必填列 -->
  563. <el-table-column
  564. prop="isRequired"
  565. label="是否必填"
  566. width="100"
  567. align="center"
  568. ></el-table-column>
  569. <!-- 是否上传列(红色“未上传”、绿色“已上传”) -->
  570. <el-table-column label="是否上传" width="100" align="center">
  571. <template slot-scope="scope">
  572. <span
  573. :style="{
  574. color:
  575. scope.row.isUploaded === true ? '#67c23a' : '#f56c6c',
  576. }"
  577. >
  578. {{ scope.row.isUploaded === true ? '已上传' : '未上传' }}
  579. </span>
  580. </template>
  581. </el-table-column>
  582. <!-- 操作列(根据“是否上传”“表格类型”显示不同按钮) -->
  583. <el-table-column label="操作" width="280" align="center">
  584. <template slot-scope="scope">
  585. <template v-if="scope.row.isUploaded">
  586. <el-button
  587. type="text"
  588. size="small"
  589. :disabled="isViewMode"
  590. @click="handleModify(scope.row)"
  591. >
  592. 修改
  593. </el-button>
  594. <el-button
  595. type="text"
  596. size="small"
  597. :disabled="isViewMode"
  598. @click="handleDataDownload(scope.row)"
  599. >
  600. 数据下载
  601. </el-button>
  602. <el-button
  603. type="text"
  604. size="small"
  605. :disabled="isViewMode"
  606. @click="handleDataUpload(scope.row)"
  607. >
  608. 数据上传
  609. </el-button>
  610. </template>
  611. <template v-else>
  612. <el-button
  613. type="text"
  614. size="small"
  615. :disabled="isViewMode"
  616. @click="handleOnlineFill(scope.row)"
  617. >
  618. 在线填报
  619. </el-button>
  620. <el-button
  621. v-if="scope.row.tableType === '动态表'"
  622. type="text"
  623. size="small"
  624. :disabled="isViewMode"
  625. @click="handleTemplateDownload(scope.row)"
  626. >
  627. 模版下载
  628. </el-button>
  629. <el-button
  630. type="text"
  631. size="small"
  632. :disabled="isViewMode"
  633. @click="handleDataUpload(scope.row)"
  634. >
  635. 数据上传
  636. </el-button>
  637. </template>
  638. </template>
  639. </el-table-column>
  640. </el-table>
  641. <el-pagination
  642. background
  643. layout="total, sizes, prev, pager, next"
  644. :current-page="costSurveyPagination.currentPage"
  645. :page-sizes="[10, 20, 30, 50]"
  646. :page-size="costSurveyPagination.pageSize"
  647. :total="costSurveyPagination.total"
  648. style="margin-top: 20px; text-align: right"
  649. @current-change="handleCostSurveyPageChange"
  650. @size-change="handleCostSurveySizeChange"
  651. />
  652. </el-tab-pane>
  653. <!-- 监审意见 -->
  654. <el-tab-pane v-if="tabVisiable" label="监审意见" name="auditOpinion">
  655. <div class="cost-supervision-container">
  656. <!-- 成本监审意见部分 -->
  657. <div class="cost-opinion-section">
  658. <h3>成本监审意见</h3>
  659. <div class="opinion-item">
  660. <label>被监审单位基本情况及主要财务状况</label>
  661. <el-input
  662. v-model="formData.auditOpinion.basicFinancialInfo"
  663. type="textarea"
  664. rows="5"
  665. :disabled="isViewMode"
  666. />
  667. </div>
  668. <div class="opinion-item">
  669. <label>监审项目现行执行的价格标准</label>
  670. <el-input
  671. v-model="formData.auditOpinion.priceStandard"
  672. type="textarea"
  673. rows="5"
  674. :disabled="isViewMode"
  675. />
  676. </div>
  677. <div class="opinion-item">
  678. <label>监审项目的成本构成、数据核增核减情况、依据及理由</label>
  679. <el-input
  680. v-model="formData.auditOpinion.costComposition"
  681. type="textarea"
  682. rows="5"
  683. :disabled="isViewMode"
  684. />
  685. </div>
  686. <div class="opinion-item">
  687. <label>成本审核初步意见</label>
  688. <el-input
  689. v-model="formData.auditOpinion.preliminaryOpinion"
  690. type="textarea"
  691. rows="5"
  692. :disabled="isViewMode"
  693. />
  694. </div>
  695. </div>
  696. <!-- 被监审单位反馈意见部分 -->
  697. <div class="feedback-section">
  698. <h3>被监审单位反馈意见</h3>
  699. <div class="feedback-item">
  700. <label>被监审单位反馈意见</label>
  701. <el-input
  702. v-model="formData.auditOpinion.enterpriseFeedback"
  703. type="textarea"
  704. rows="5"
  705. :disabled="isViewMode"
  706. />
  707. </div>
  708. <div class="feedback-item">
  709. <label>被监审单位反馈资料</label>
  710. <div
  711. style="
  712. border: 1px solid #e9e9e9;
  713. border-radius: 10px;
  714. padding: 20px 10px;
  715. width: 100%;
  716. "
  717. >
  718. <el-upload
  719. class="upload-demo"
  720. action="https://jsonplaceholder.typicode.com/posts/"
  721. :on-preview="handlePreview"
  722. :on-remove="handleRemove"
  723. :before-remove="beforeRemove"
  724. multiple
  725. :limit="1"
  726. :on-exceed="handleExceed"
  727. :file-list="formData.auditOpinion.fileList"
  728. >
  729. <el-button size="small" type="text" :disabled="isViewMode">
  730. 上传附件
  731. </el-button>
  732. </el-upload>
  733. </div>
  734. </div>
  735. </div>
  736. </div>
  737. </el-tab-pane>
  738. <!-- 消息通知 -->
  739. <el-tab-pane label="消息通知" name="messageNotice">
  740. <el-table
  741. style="width: 100%; margin-top: 20px"
  742. border
  743. :data="formData.messageNoticeData"
  744. >
  745. <el-table-column prop="id" label="序号" width="120" align="center">
  746. <template slot-scope="scope">
  747. {{ scope.$index + 1 }}
  748. </template>
  749. </el-table-column>
  750. <el-table-column
  751. prop="noticeTitle"
  752. label="消息主题"
  753. width="200"
  754. align="center"
  755. ></el-table-column>
  756. <el-table-column
  757. prop="noticeSource"
  758. label="消息来源"
  759. width="150"
  760. align="center"
  761. ></el-table-column>
  762. <el-table-column
  763. prop="noticeContent"
  764. label="消息内容"
  765. min-width="350"
  766. align="center"
  767. ></el-table-column>
  768. <el-table-column
  769. prop="createTime"
  770. label="发送时间"
  771. width="230"
  772. align="center"
  773. ></el-table-column>
  774. </el-table>
  775. <el-pagination
  776. background
  777. layout="total, sizes, prev, pager, next"
  778. :current-page="messageNoticePagination.currentPage"
  779. :page-sizes="[10, 20, 30, 50]"
  780. :page-size="messageNoticePagination.pageSize"
  781. :total="messageNoticePagination.total"
  782. style="margin-top: 20px; text-align: right"
  783. @current-change="handleMessageNoticePageChange"
  784. @size-change="handleMessageNoticeSizeChange"
  785. />
  786. </el-tab-pane>
  787. </el-tabs>
  788. </div>
  789. <!-- 补充材料弹窗 -->
  790. <el-dialog
  791. title="补充材料"
  792. :visible.sync="materialDialogVisible"
  793. width="600px"
  794. :close-on-click-modal="false"
  795. >
  796. <el-form
  797. ref="materialForm"
  798. :model="materialForm"
  799. :rules="materialRules"
  800. label-width="100px"
  801. >
  802. <el-form-item label="资料类别" prop="informationType">
  803. <el-select
  804. v-model="materialForm.informationType"
  805. placeholder="请选择资料类别"
  806. style="width: 100%"
  807. :disabled="isViewMode"
  808. >
  809. <el-option
  810. v-for="item in dictData['materialType']"
  811. :key="item.key"
  812. :label="item.name"
  813. :value="item.key"
  814. ></el-option>
  815. </el-select>
  816. </el-form-item>
  817. <el-form-item label="资料名称" prop="informationName">
  818. <el-input
  819. v-model="materialForm.informationName"
  820. placeholder="请输入资料名称"
  821. style="width: 100%"
  822. :disabled="isViewMode"
  823. ></el-input>
  824. </el-form-item>
  825. <el-form-item label="资料要求:" prop="informationRequire">
  826. <el-input
  827. v-model="materialForm.informationRequire"
  828. placeholder="请输入资料要求"
  829. :disabled="isViewMode"
  830. ></el-input>
  831. </el-form-item>
  832. <el-form-item label="格式要求:" prop="formatRequired">
  833. <el-select
  834. v-model="materialForm.formatRequired"
  835. placeholder="请选择格式要求"
  836. style="width: 100%"
  837. :disabled="isViewMode"
  838. >
  839. <el-option
  840. v-for="item in dictData['formatAsk']"
  841. :key="item.id"
  842. :label="item.name"
  843. :value="item.key"
  844. ></el-option>
  845. </el-select>
  846. </el-form-item>
  847. <el-form-item label="上传附件:" prop="fileList">
  848. <el-upload
  849. class="upload-demo"
  850. :action="''"
  851. :http-request="handleMaterialUpload"
  852. :on-remove="handleMaterialRemove"
  853. :before-upload="beforeMaterialUpload"
  854. :on-success="handleMaterialUploadSuccess"
  855. :on-error="handleMaterialUploadError"
  856. :on-progress="handleMaterialUploadProgress"
  857. :file-list="materialForm.fileList"
  858. :limit="1"
  859. :on-exceed="handleMaterialExceed"
  860. >
  861. <el-button
  862. v-show="
  863. !materialForm.fileList || materialForm.fileList.length === 0
  864. "
  865. size="small"
  866. type="primary"
  867. :disabled="isViewMode"
  868. >
  869. 选择文件
  870. </el-button>
  871. <!-- <div slot="tip" class="el-upload__tip">
  872. 最多上传1个文件,支持 pdf, doc, docx, xls, xlsx, csv 格式,单个文件不超过50MB
  873. </div> -->
  874. </el-upload>
  875. </el-form-item>
  876. <!-- <el-button
  877. type="text"
  878. size="mini"
  879. @click="handleMaterialUpload"
  880. >
  881. 上传附件
  882. </el-button> -->
  883. </el-form>
  884. <div slot="footer" class="dialog-footer">
  885. <el-button
  886. type="primary"
  887. :disabled="isViewMode"
  888. @click="handleMaterialSubmit"
  889. >
  890. 保 存
  891. </el-button>
  892. <el-button :disabled="isViewMode" @click="handleMaterialCancel">
  893. 取 消
  894. </el-button>
  895. </div>
  896. </el-dialog>
  897. <!-- 在线填报弹窗 -->
  898. <OnlineFillDialog
  899. :visible.sync="onlineFillDialogVisible"
  900. :table-type="currentSurveyData ? currentSurveyData.tableType : '单记录'"
  901. :survey-data="currentSurveyData || {}"
  902. />
  903. </div>
  904. </template>
  905. <script>
  906. import { Message } from 'element-ui'
  907. import OnlineFillDialog from './OnlineFill.vue'
  908. import {
  909. getProjectInformationInfo,
  910. getTaskRequirementList,
  911. addOrUpdateTaskRequirement,
  912. submitTaskRequirement,
  913. sendMessage,
  914. } from '@/api/auditTaskProcessing'
  915. import RegionSelector from '@/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/RegionSelector.vue'
  916. import CatalogCascader from '@/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/CatalogCascader.vue'
  917. // import UploadComponent from '@/components/costAudit/UploadComponent.vue'
  918. import { getAllUnitList } from '@/api/auditEntityManage'
  919. import { getDefaultDem, getOrgListByDemId } from '@/api/annualReviewPlan'
  920. import { getAllUserList } from '@/api/uc'
  921. import { dictMixin } from '@/mixins/useDict'
  922. import { uploadFile } from '@/api/file'
  923. export default {
  924. name: 'TaskFillIn',
  925. components: {
  926. OnlineFillDialog,
  927. RegionSelector,
  928. CatalogCascader,
  929. // UploadComponent,
  930. },
  931. mixins: [dictMixin],
  932. data() {
  933. return {
  934. isViewMode: false, // 是否为查看模式
  935. unitList: [],
  936. OrgList: [],
  937. userList: [],
  938. dictData: {
  939. attributionYear: [], // 归属年度
  940. projectProposal: [], // 立项来源
  941. auditType: [], //监审形式
  942. materialType: [], // 资料类别
  943. materialCategory: [], // 资料类别
  944. formatAsk: [], // 资料类型
  945. },
  946. // 立项依据文件列表
  947. accordingFileList: [],
  948. // 其他材料文件列表
  949. otherFileList: [],
  950. // 页面标题
  951. pageTitle: '立项信息',
  952. projectId: '', // 项目ID
  953. taskId: '', // 任务ID
  954. // 当前激活的标签页
  955. activeTab: 'projectInfo',
  956. // 加载状态管理
  957. loading: {
  958. submit: false,
  959. save: false,
  960. },
  961. isDisabled: false,
  962. tabCheck: '', // 状态判断监审意见是否显示
  963. tabVisiable: true, // 标签页是否显示
  964. // 成本调查表分页相关
  965. costSurveyPagination: {
  966. currentPage: 1,
  967. pageSize: 10,
  968. total: 0,
  969. },
  970. // 消息通知分页相关
  971. messageNoticePagination: {
  972. currentPage: 1,
  973. pageSize: 10,
  974. total: 0,
  975. },
  976. // 所有表单数据聚合
  977. formData: {
  978. basicInfo: {
  979. projectName: '',
  980. catalogId: '',
  981. areaCode: '',
  982. auditUnitId: [],
  983. auditUnitName: '',
  984. orgId: '',
  985. orgName: '',
  986. projectYear: '',
  987. sourceType: '',
  988. auditType: '',
  989. auditPeriod: '',
  990. auditPeriodArray: [{ value: '' }],
  991. needHearing: 1,
  992. isEmergency: 1,
  993. establishmentReason: '',
  994. accordingFileUrl: '',
  995. otherFileUrl: '',
  996. auditGroup: '',
  997. auditTeamMembers: [],
  998. expertStr: '',
  999. plannedAuditStartDate: '',
  1000. plannedAuditEndDate: '',
  1001. },
  1002. auditDocument: [
  1003. {
  1004. date: '2016-05-02',
  1005. name: '王小虎',
  1006. province: '上海',
  1007. city: '普陀区',
  1008. address: '上海市普陀区金沙江路 1518 弄',
  1009. zip: 200333,
  1010. },
  1011. {
  1012. date: '2016-05-04',
  1013. name: '王小虎',
  1014. province: '上海',
  1015. city: '普陀区',
  1016. address: '上海市普陀区金沙江路 1517 弄',
  1017. zip: 200333,
  1018. },
  1019. ],
  1020. dataRequirements: [],
  1021. costSurveyData: [
  1022. {
  1023. index: 1,
  1024. name: '封面',
  1025. dataType: '模版定制',
  1026. tableType: '单记录',
  1027. isRequired: '是',
  1028. isUploaded: false,
  1029. isDisabled: false,
  1030. },
  1031. {
  1032. index: 2,
  1033. name: '企业基本情况调查表',
  1034. dataType: '模版定制',
  1035. tableType: '固定表',
  1036. isRequired: '是',
  1037. isUploaded: true,
  1038. isDisabled: false,
  1039. },
  1040. {
  1041. index: 3,
  1042. name: '企业成本费用调查表',
  1043. dataType: '模版定制',
  1044. tableType: '固定表',
  1045. isRequired: '是',
  1046. isUploaded: true,
  1047. isDisabled: false,
  1048. },
  1049. {
  1050. index: 4,
  1051. name: '企业期间费用调查表',
  1052. dataType: '模版定制',
  1053. tableType: '动态表',
  1054. isRequired: '是',
  1055. isUploaded: false,
  1056. isDisabled: true, // 灰色不可点击
  1057. },
  1058. {
  1059. index: 5,
  1060. name: '企业职工薪酬调查表',
  1061. dataType: '模版定制',
  1062. tableType: '动态表',
  1063. isRequired: '是',
  1064. isUploaded: false,
  1065. isDisabled: true, // 灰色不可点击
  1066. },
  1067. {
  1068. index: 6,
  1069. name: '……',
  1070. dataType: '模版定制',
  1071. tableType: '动态表',
  1072. isRequired: '是',
  1073. isUploaded: false,
  1074. isDisabled: false,
  1075. },
  1076. ],
  1077. auditOpinion: {
  1078. basicFinancialInfo:
  1079. '此处为被监审单位基本情况及主要财务状况的内容...',
  1080. priceStandard: '此处为监审项目现行执行的价格标准的内容...',
  1081. costComposition:
  1082. '此处为监审项目的成本构成、数据核增核减情况、依据及理由的内容...',
  1083. preliminaryOpinion: '此处为成本审核初步意见的内容...',
  1084. enterpriseFeedback: '', // 被监审单位可输入反馈意见
  1085. fileList: [], // 被监审单位上传的反馈文件
  1086. },
  1087. messageNotice: {},
  1088. },
  1089. // 监审地区级联选择器
  1090. regionOptions: [
  1091. {
  1092. value: 'zhinan',
  1093. label: '指南',
  1094. children: [
  1095. {
  1096. value: 'shejiyuanze',
  1097. label: '设计原则',
  1098. children: [
  1099. {
  1100. value: 'yizhi',
  1101. label: '一致',
  1102. },
  1103. {
  1104. value: 'fankui',
  1105. label: '反馈',
  1106. },
  1107. {
  1108. value: 'xiaolv',
  1109. label: '效率',
  1110. },
  1111. {
  1112. value: 'kekong',
  1113. label: '可控',
  1114. },
  1115. ],
  1116. },
  1117. ],
  1118. },
  1119. ],
  1120. dialogVisible: false,
  1121. catalogueData: [
  1122. {
  1123. label: '一级 1',
  1124. children: [
  1125. {
  1126. label: '二级 1-1',
  1127. children: [
  1128. {
  1129. label: '三级 1-1-1',
  1130. },
  1131. ],
  1132. },
  1133. ],
  1134. },
  1135. {
  1136. label: '一级 2',
  1137. children: [
  1138. {
  1139. label: '二级 2-1',
  1140. children: [
  1141. {
  1142. label: '三级 2-1-1',
  1143. },
  1144. ],
  1145. },
  1146. {
  1147. label: '二级 2-2',
  1148. children: [
  1149. {
  1150. label: '三级 2-2-1',
  1151. },
  1152. ],
  1153. },
  1154. ],
  1155. },
  1156. {
  1157. label: '一级 3',
  1158. children: [
  1159. {
  1160. label: '二级 3-1',
  1161. children: [
  1162. {
  1163. label: '三级 3-1-1',
  1164. },
  1165. ],
  1166. },
  1167. {
  1168. label: '二级 3-2',
  1169. children: [
  1170. {
  1171. label: '三级 3-2-1',
  1172. },
  1173. ],
  1174. },
  1175. ],
  1176. },
  1177. ],
  1178. defaultProps: {
  1179. children: 'children',
  1180. label: 'label',
  1181. },
  1182. messageNoticeData: [],
  1183. // 补充材料弹窗相关数据
  1184. materialDialogVisible: false,
  1185. materialForm: {
  1186. informationType: '',
  1187. informationName: '',
  1188. informationRequire: '',
  1189. formatRequired: '',
  1190. fileList: [],
  1191. fileUrl: '',
  1192. },
  1193. materialRules: {
  1194. informationType: [
  1195. { required: true, message: '请选择资料类别', trigger: 'change' },
  1196. ],
  1197. informationName: [
  1198. { required: true, message: '请输入资料名称', trigger: 'blur' },
  1199. ],
  1200. formatRequired: [
  1201. { required: true, message: '请选择格式要求', trigger: 'change' },
  1202. ],
  1203. informationRequire: [
  1204. { required: true, message: '请输入资料要求', trigger: 'blur' },
  1205. ],
  1206. },
  1207. materialCategoryOptions: [
  1208. { label: '综合性资料', value: 'comprehensive' },
  1209. { label: '财务会计资料', value: 'financial' },
  1210. { label: '其他资料', value: 'other' },
  1211. ],
  1212. // 修复未定义的变量
  1213. value: [], // 监审地区级联选择器的值
  1214. value3: null, // 年份选择器的值
  1215. // 在线填报弹窗相关数据
  1216. onlineFillDialogVisible: false,
  1217. currentSurveyData: null,
  1218. }
  1219. },
  1220. computed: {
  1221. // 按类别分组的报送资料列表
  1222. groupedDataRequirements() {
  1223. if (
  1224. !this.formData.dataRequirements ||
  1225. !Array.isArray(this.formData.dataRequirements) ||
  1226. this.formData.dataRequirements.length === 0
  1227. ) {
  1228. return []
  1229. }
  1230. // 按类别分组
  1231. const groups = {}
  1232. this.formData.dataRequirements.forEach((item, index) => {
  1233. // 获取类别标识,使用 informationType 作为类别 key
  1234. const categoryKey =
  1235. item.informationType ||
  1236. item.category ||
  1237. item.categoryId ||
  1238. item.categoryName ||
  1239. 'other'
  1240. // 优先从字典中获取类别名称
  1241. let categoryName = ''
  1242. if (categoryKey) {
  1243. // 优先使用 getDictNameByValue 根据 value 查找
  1244. categoryName = this.getDictNameByValue(
  1245. 'materialCategory',
  1246. categoryKey
  1247. )
  1248. // 如果 getDictNameByValue 没找到,尝试使用 getDictName 根据 key 查找
  1249. if (!categoryName || categoryName === String(categoryKey)) {
  1250. categoryName = this.getDictName('materialCategory', categoryKey)
  1251. }
  1252. // 如果字典中都找不到,使用 item.categoryName 作为后备
  1253. if (!categoryName || categoryName === String(categoryKey)) {
  1254. categoryName = item.informationTypeName || categoryKey
  1255. }
  1256. }
  1257. if (!groups[categoryKey]) {
  1258. groups[categoryKey] = {
  1259. categoryKey,
  1260. categoryName: categoryName || String(categoryKey),
  1261. items: [],
  1262. }
  1263. }
  1264. // 添加序号(每个类别内从1开始)
  1265. const itemWithSeq = {
  1266. ...item,
  1267. index: index + 1,
  1268. seq: groups[categoryKey].items.length + 1,
  1269. }
  1270. groups[categoryKey].items.push(itemWithSeq)
  1271. })
  1272. // 将分组转换为扁平数组,插入类别标题行
  1273. const result = []
  1274. Object.keys(groups).forEach((categoryKey) => {
  1275. const group = groups[categoryKey]
  1276. // 添加类别标题行
  1277. result.push({
  1278. isCategoryHeader: true,
  1279. categoryName: group.categoryName,
  1280. categoryKey: group.categoryKey,
  1281. })
  1282. // 添加该类别下的所有项目
  1283. group.items.forEach((item) => {
  1284. result.push({
  1285. ...item,
  1286. isCategoryHeader: false,
  1287. })
  1288. })
  1289. })
  1290. return result
  1291. },
  1292. // 分页后的成本调查表数据
  1293. paginatedCostSurveyData() {
  1294. const start =
  1295. (this.costSurveyPagination.currentPage - 1) *
  1296. this.costSurveyPagination.pageSize
  1297. const end = start + this.costSurveyPagination.pageSize
  1298. return this.formData.costSurveyData.slice(start, end)
  1299. },
  1300. },
  1301. mounted() {
  1302. this.getAllUnitList()
  1303. this.getDefaultDem()
  1304. this.getUser()
  1305. // 从路由参数中获取 formType
  1306. console.log('路由参数', this.$route.query)
  1307. // 判断是否为查看模式
  1308. this.isViewMode =
  1309. this.$route.query.viewMode === true ||
  1310. this.$route.query.viewMode === 'true'
  1311. this.projectId = this.$route.query.info.projectId
  1312. this.taskId = this.$route.query.info.userTask.id
  1313. this.tabCheck = this.$route.query.info.status
  1314. if (this.tabCheck === 'jtsy') {
  1315. this.tabVisiable = false
  1316. }
  1317. const formType = this.$route.query.formTypeconst
  1318. if (formType) {
  1319. // 如果有 formType,将 activeTab 设置为 formType
  1320. this.activeTab = formType
  1321. // 更新页面标题
  1322. this.pageTitle = '消息通知'
  1323. } else {
  1324. this.getProjectInformation()
  1325. }
  1326. // 初始化成本调查表分页总数
  1327. this.costSurveyPagination.total = this.formData.costSurveyData.length
  1328. },
  1329. methods: {
  1330. getAllUnitList() {
  1331. getAllUnitList().then((res) => {
  1332. this.unitList = res.value || []
  1333. })
  1334. },
  1335. // 获取默认维度
  1336. getDefaultDem() {
  1337. getDefaultDem().then((res) => {
  1338. if (res && res.code === 200) {
  1339. const demId = res.value ? res.value.id : null
  1340. if (demId) {
  1341. this.getOrgListByDemId(demId)
  1342. }
  1343. }
  1344. })
  1345. },
  1346. // 根据维度ID获取单位列表
  1347. getOrgListByDemId(demId) {
  1348. getOrgListByDemId({ demId }).then((res) => {
  1349. if (res && res.code === 200) {
  1350. this.OrgList = res.value || []
  1351. }
  1352. })
  1353. },
  1354. // 获取用户信息
  1355. getUser() {
  1356. getAllUserList()
  1357. .then((res) => {
  1358. this.userList = res.value || []
  1359. })
  1360. .catch(() => {})
  1361. },
  1362. // 添加监审年份
  1363. addCostYear() {
  1364. this.formData.basicInfo.auditPeriodArray.push({ value: '' })
  1365. },
  1366. // 删除监审年份
  1367. deleteCostYear(index) {
  1368. // 若只剩1条,禁止删除并提示
  1369. if (this.formData.basicInfo.auditPeriodArray.length <= 1) {
  1370. Message.warning('监审期间至少需保留1条,无法删除')
  1371. return
  1372. }
  1373. this.formData.basicInfo.auditPeriodArray.splice(index, 1)
  1374. },
  1375. // 更新auditPeriod字符串
  1376. updateAuditPeriodString() {
  1377. const values = this.formData.basicInfo.auditPeriodArray
  1378. .map((item) => item.value)
  1379. .filter(Boolean)
  1380. const uniqueValues = [...new Set(values)]
  1381. this.formData.basicInfo.auditPeriod = uniqueValues.join(',')
  1382. },
  1383. // 立项依据文件处理
  1384. saveAccordingFiles(data) {
  1385. this.accordingFileList = data
  1386. this.formData.basicInfo.accordingFileUrl = data[0]?.savePath || ''
  1387. },
  1388. // 移除立项依据文件
  1389. removeAccordingFile() {
  1390. this.accordingFileList = []
  1391. this.formData.basicInfo.accordingFileUrl = ''
  1392. },
  1393. // 其他材料文件处理
  1394. saveOtherFiles(data) {
  1395. this.otherFileList = data
  1396. this.formData.basicInfo.otherFileUrl = data[0]?.savePath || ''
  1397. },
  1398. // 移除其他材料文件
  1399. removeOtherFile() {
  1400. this.otherFileList = []
  1401. this.formData.basicInfo.otherFileUrl = ''
  1402. },
  1403. // 处理地区选择变化
  1404. handleRegionChange(region) {
  1405. this.formData.basicInfo.areaCode = region.code
  1406. },
  1407. // 处理监审目录选择后的回调
  1408. handleCatalogChange(value) {
  1409. // this.formData.catalogId = value.join(',')
  1410. this.formData.basicInfo.catalogId = value
  1411. },
  1412. // 表格行样式
  1413. getRowClassName({ row }) {
  1414. if (row.isCategoryHeader) {
  1415. return 'category-header-row'
  1416. }
  1417. return ''
  1418. },
  1419. // 标签页切换
  1420. handleTabClick(tab) {
  1421. console.log(tab, 'qiehuan')
  1422. if (tab.name === 'projectInfo') {
  1423. // 立项项目信息
  1424. this.getProjectInformation()
  1425. } else if (tab.name === 'dataRequirements') {
  1426. this.getTaskRequirementPage() // 报送资料要求
  1427. } else if (tab.name === 'messageNotice') {
  1428. this.getSendMessage() // 消息通知
  1429. }
  1430. // 可添加标签页切换时的逻辑
  1431. this.pageTitle = tab.label
  1432. },
  1433. // 获取立项项目信息
  1434. getProjectInformation() {
  1435. getProjectInformationInfo(this.projectId).then((res) => {
  1436. console.log('立项项目信息', res)
  1437. if (res && res.value) {
  1438. const data = res.value
  1439. // 处理监审期间数组
  1440. let auditPeriodArray = [{ value: '' }]
  1441. if (data.auditPeriod && typeof data.auditPeriod === 'string') {
  1442. const periods = data.auditPeriod.split(',').filter(Boolean)
  1443. auditPeriodArray = periods.map((p) => ({ value: p }))
  1444. }
  1445. // 赋值并添加转换后的数组
  1446. this.formData.basicInfo = {
  1447. ...data,
  1448. auditPeriodArray: auditPeriodArray,
  1449. }
  1450. }
  1451. })
  1452. },
  1453. // 获取报送资料要求列表
  1454. getTaskRequirementPage() {
  1455. console.log('送报资料接口', this.taskId)
  1456. getTaskRequirementList(this.taskId)
  1457. .then((res) => {
  1458. console.log('报送资料要求', res)
  1459. if (res && res.code === 200 && res.value) {
  1460. this.formData.dataRequirements = Array.isArray(res.value)
  1461. ? res.value
  1462. : []
  1463. } else {
  1464. this.formData.dataRequirements = []
  1465. }
  1466. })
  1467. .catch((err) => {
  1468. console.error('获取报送资料失败', err)
  1469. this.formData.dataRequirements = []
  1470. })
  1471. },
  1472. // 消息通知
  1473. getSendMessage() {
  1474. const params = {
  1475. taskId: this.taskId,
  1476. currentPage: this.messageNoticePagination.currentPage,
  1477. pageSize: this.messageNoticePagination.pageSize,
  1478. }
  1479. sendMessage(params)
  1480. .then((res) => {
  1481. console.log('消息通知', res)
  1482. if (res && res.code === 200 && res.value && res.value.value) {
  1483. this.formData.messageNoticeData = res.value.value.records || []
  1484. this.messageNoticePagination.total = res.value.value.total || 0
  1485. } else {
  1486. this.formData.messageNoticeData = []
  1487. this.messageNoticePagination.total = 0
  1488. }
  1489. })
  1490. .catch((err) => {
  1491. console.error('获取消息通知失败', err)
  1492. this.formData.messageNoticeData = []
  1493. this.messageNoticePagination.total = 0
  1494. })
  1495. },
  1496. // 提交
  1497. handleSubmit() {
  1498. this.loading.submit = true
  1499. // 保存逻辑
  1500. setTimeout(() => {
  1501. submitTaskRequirement({ taskId: this.taskId })
  1502. .then((res) => {
  1503. this.loading.submit = false
  1504. console.log('提交成功', res)
  1505. if (res && res.code === 200) {
  1506. Message.success('提交成功')
  1507. this.handleBack()
  1508. } else {
  1509. Message.error('提交失败')
  1510. }
  1511. })
  1512. .catch((err) => {
  1513. console.error('提交失败', err)
  1514. Message.error('提交失败')
  1515. })
  1516. }, 500)
  1517. },
  1518. // 保存
  1519. handleSave() {
  1520. this.loading.save = true
  1521. // 保存逻辑
  1522. setTimeout(() => {
  1523. this.loading.save = false
  1524. Message.success('保存成功')
  1525. }, 500)
  1526. },
  1527. // 返回
  1528. handleBack() {
  1529. this.$router.back()
  1530. },
  1531. // 监审地区级联选择器
  1532. handleChange(value) {
  1533. console.log(value)
  1534. },
  1535. // 监审地区级联选择器节点点击
  1536. handleNodeClick(data) {
  1537. console.log(data)
  1538. this.formData.basicInfo.projectName = data.label
  1539. },
  1540. // 查看文书
  1541. handleClick(row) {
  1542. console.log(row)
  1543. if (row.fileUrl) {
  1544. window.open(row.fileUrl, '_blank')
  1545. } else {
  1546. this.$message.warning('暂无文件可查看')
  1547. }
  1548. },
  1549. // 下载文书
  1550. handleDownload(row) {
  1551. console.log(row)
  1552. if (!row.fileUrl) {
  1553. this.$message.warning('该文书暂无文件可下载')
  1554. return
  1555. }
  1556. // 创建隐藏的a标签进行下载
  1557. const link = document.createElement('a')
  1558. link.style.display = 'none'
  1559. link.href = row.fileUrl
  1560. // 设置下载文件名
  1561. link.download = row.name || '文书文件'
  1562. document.body.appendChild(link)
  1563. link.click()
  1564. document.body.removeChild(link)
  1565. this.$message.success('开始下载文件')
  1566. },
  1567. // 上传附件
  1568. handleUpload(row) {
  1569. console.log(row)
  1570. },
  1571. // 报送资料相关操作方法
  1572. handleFileView(row) {
  1573. console.log('查看文件:', row)
  1574. // 实际开发中可添加文件预览逻辑(如打开新窗口、弹窗展示等)
  1575. if (row.fileUrl) {
  1576. window.open(row.fileUrl, '_blank')
  1577. } else {
  1578. this.$message.warning('暂无文件可查看')
  1579. }
  1580. },
  1581. handleFileDownload(row) {
  1582. console.log('下载文件:', row)
  1583. if (!row.fileUrl) {
  1584. this.$message.warning('该资料暂无文件可下载')
  1585. return
  1586. }
  1587. // 创建隐藏的a标签进行下载
  1588. const link = document.createElement('a')
  1589. link.style.display = 'none'
  1590. link.href = row.fileUrl
  1591. // 设置下载文件名,优先使用资料名称
  1592. link.download = row.informationName || '下载文件'
  1593. document.body.appendChild(link)
  1594. link.click()
  1595. document.body.removeChild(link)
  1596. this.$message.success('开始下载文件')
  1597. },
  1598. // 报送资料文件上传
  1599. async handleFileUpload(row) {
  1600. // 创建文件选择器
  1601. const input = document.createElement('input')
  1602. input.type = 'file'
  1603. input.accept = '.pdf,.doc,.docx,.xls,.xlsx,.csv' // 允许的文件类型
  1604. input.onchange = async (event) => {
  1605. const file = event.target.files[0]
  1606. if (!file) return
  1607. try {
  1608. // 校验文件大小(50MB)
  1609. const maxSize = 50 * 1024 * 1024 // 50MB
  1610. if (file.size > maxSize) {
  1611. this.$message.error('文件大小不能超过50MB!')
  1612. return
  1613. }
  1614. // 校验文件格式
  1615. const allowedFormats = [
  1616. '.pdf',
  1617. '.doc',
  1618. '.docx',
  1619. '.xls',
  1620. '.xlsx',
  1621. '.csv',
  1622. ]
  1623. const fileName = file.name.toLowerCase()
  1624. const isValidFormat = allowedFormats.some((format) =>
  1625. fileName.endsWith(format)
  1626. )
  1627. if (!isValidFormat) {
  1628. this.$message.error(
  1629. '只允许上传.pdf,.doc,.docx,.xls,.xlsx,.csv格式的文件!'
  1630. )
  1631. return
  1632. }
  1633. // 显示上传加载提示
  1634. const loading = this.$baseLoading(1, '文件上传中...')
  1635. // 创建FormData并上传文件
  1636. const formData = new FormData()
  1637. formData.append('file', file)
  1638. // 调用上传API
  1639. const uploadRes = await uploadFile('/api/file/v1/upload', formData)
  1640. // 检查上传结果
  1641. if (!uploadRes || uploadRes.code !== 200 || !uploadRes.value) {
  1642. loading.close()
  1643. this.$message.error('文件上传失败,请稍后重试')
  1644. return
  1645. }
  1646. // 文件上传成功后,更新报送资料项
  1647. const fileInfo = uploadRes.value
  1648. const updateData = {
  1649. // id: row.id,
  1650. // taskId: this.taskId,
  1651. // projectId: this.projectId,
  1652. // informationType: row.informationType,
  1653. // informationName: row.informationName,
  1654. // informationRequire: row.informationRequire,
  1655. // formatRequired: row.formatRequired,
  1656. // isRequired: row.isRequired,
  1657. ...row,
  1658. fileUrl: fileInfo.savePath || fileInfo.url, // 更新文件URL
  1659. }
  1660. // 调用更新API
  1661. const updateRes = await addOrUpdateTaskRequirement(updateData)
  1662. loading.close()
  1663. if (updateRes && updateRes.code === 200) {
  1664. this.$message.success('文件上传并更新成功!')
  1665. // 刷新报送资料列表
  1666. this.getTaskRequirementPage()
  1667. } else {
  1668. this.$message.error('文件上传成功,但更新资料失败')
  1669. }
  1670. } catch (error) {
  1671. console.error('文件上传失败:', error)
  1672. this.$message.error('操作失败:' + (error.message || '未知错误'))
  1673. }
  1674. }
  1675. // 触发文件选择
  1676. input.click()
  1677. },
  1678. handleTemplateDownload(row) {
  1679. console.log('下载预置模版:', row)
  1680. if (!row.templateUrl && !row.fileUrl) {
  1681. this.$message.warning('该模版暂无文件可下载')
  1682. return
  1683. }
  1684. const downloadUrl = row.templateUrl || row.fileUrl
  1685. const link = document.createElement('a')
  1686. link.style.display = 'none'
  1687. link.href = downloadUrl
  1688. link.download = row.name ? `${row.name}_模版` : '模版文件'
  1689. document.body.appendChild(link)
  1690. link.click()
  1691. document.body.removeChild(link)
  1692. this.$message.success('开始下载模版')
  1693. },
  1694. handleDataUpload(row) {
  1695. console.log('上传模版数据:', row)
  1696. // 实际开发中可添加基于模版的数据上传逻辑
  1697. },
  1698. handleRemove(file, fileList) {
  1699. console.log(file, fileList)
  1700. },
  1701. handlePreview(file) {
  1702. console.log(file)
  1703. },
  1704. handleExceed(files, fileList) {
  1705. this.$message.warning(
  1706. `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
  1707. files.length + fileList.length
  1708. } 个文件`
  1709. )
  1710. },
  1711. beforeRemove(file, fileList) {
  1712. return this.$confirm(`确定移除 ${file.name}?`)
  1713. },
  1714. // 成本调查表点击事件(可点击时触发)
  1715. handleSurveyClick(row) {
  1716. console.log('点击成本调查表:', row.name)
  1717. // 实际逻辑:跳转页面、打开弹窗等
  1718. },
  1719. // 在线填报
  1720. handleOnlineFill(row) {
  1721. console.log('在线填报:', row.name)
  1722. this.currentSurveyData = row
  1723. this.onlineFillDialogVisible = true
  1724. },
  1725. // 修改已上传的表
  1726. handleModify(row) {
  1727. console.log('修改:', row.name)
  1728. // 实际逻辑:打开修改表单
  1729. },
  1730. // 数据下载
  1731. handleDataDownload(row) {
  1732. console.log('数据下载:', row.name)
  1733. if (!row.fileUrl && !row.dataUrl) {
  1734. this.$message.warning('该数据暂无文件可下载')
  1735. return
  1736. }
  1737. const downloadUrl = row.dataUrl || row.fileUrl
  1738. const link = document.createElement('a')
  1739. link.style.display = 'none'
  1740. link.href = downloadUrl
  1741. link.download = row.name ? `${row.name}_数据` : '数据文件'
  1742. document.body.appendChild(link)
  1743. link.click()
  1744. document.body.removeChild(link)
  1745. this.$message.success('开始下载数据')
  1746. },
  1747. // 补充材料相关方法
  1748. handleAddMaterial() {
  1749. this.materialDialogVisible = true
  1750. this.resetMaterialForm()
  1751. },
  1752. // 重置补充材料表单
  1753. resetMaterialForm() {
  1754. this.materialForm = {
  1755. informationType: '',
  1756. informationName: '',
  1757. informationRequire: '',
  1758. formatRequired: '',
  1759. fileList: [],
  1760. fileUrl: '',
  1761. }
  1762. if (this.$refs.materialForm) {
  1763. this.$refs.materialForm.resetFields()
  1764. }
  1765. },
  1766. // 补充材料弹窗取消
  1767. handleMaterialCancel() {
  1768. this.materialDialogVisible = false
  1769. this.resetMaterialForm()
  1770. },
  1771. // 补充材料弹窗确定
  1772. handleMaterialSubmit() {
  1773. this.$refs.materialForm.validate((valid) => {
  1774. if (valid) {
  1775. // 这里可以添加提交逻辑
  1776. console.log('补充材料表单数据:', this.materialForm)
  1777. addOrUpdateTaskRequirement({
  1778. taskId: this.taskId,
  1779. projectId: this.projectId,
  1780. informationType: this.materialForm.informationType,
  1781. informationName: this.materialForm.informationName,
  1782. informationRequire: this.materialForm.informationRequire,
  1783. formatRequired: this.materialForm.formatRequired,
  1784. fileUrl: this.materialForm.fileUrl,
  1785. })
  1786. .then((res) => {
  1787. console.log('补充材料提交成功', res)
  1788. if (res && res.code === 200) {
  1789. Message.success('补充材料提交成功')
  1790. this.materialDialogVisible = false
  1791. this.resetMaterialForm()
  1792. this.getTaskRequirementPage()
  1793. } else {
  1794. Message.error('补充材料提交失败')
  1795. }
  1796. })
  1797. .catch((err) => {
  1798. console.error('补充材料提交失败', err)
  1799. Message.error('补充材料提交失败')
  1800. })
  1801. } else {
  1802. Message.error('请完善表单信息')
  1803. return false
  1804. }
  1805. })
  1806. },
  1807. // 上传
  1808. // handleMaterialUpload(row, type) {
  1809. // let loading = null
  1810. // // 第一步:创建文件选择器
  1811. // const input = document.createElement('input')
  1812. // input.type = 'file'
  1813. // input.accept = '.pdf,.doc,.docx,.xls,.xlsx,.csv' // 允许的文件类型
  1814. // input.onchange = async (event) => {
  1815. // const file = event.target.files[0]
  1816. // if (!file) return
  1817. // try {
  1818. // // 校验文件大小(50MB)
  1819. // const maxSize = 50 * 1024 * 1024 // 50MB
  1820. // if (file.size > maxSize) {
  1821. // this.$message.error('文件大小不能超过50MB!')
  1822. // return
  1823. // }
  1824. // // 校验文件格式
  1825. // const allowedFormats = [
  1826. // '.pdf',
  1827. // '.doc',
  1828. // '.docx',
  1829. // '.xls',
  1830. // '.xlsx',
  1831. // 'csv',
  1832. // ]
  1833. // const fileName = file.name.toLowerCase()
  1834. // const isValidFormat = allowedFormats.some((format) =>
  1835. // fileName.endsWith(format)
  1836. // )
  1837. // if (!isValidFormat) {
  1838. // this.$message.error(
  1839. // '只允许上传.pdf,.doc,.docx,.xls,.xlsx,.csv格式的文件!'
  1840. // )
  1841. // return
  1842. // }
  1843. // // 显示遮罩层
  1844. // loading = this.$baseLoading(1, '文件上传中...')
  1845. // // 第三步:创建FormData并上传文件
  1846. // const formData = new FormData()
  1847. // formData.append('file', file)
  1848. // // 先调用上传API
  1849. // const uploadRes = await uploadFile('/api/file/v1/upload', formData)
  1850. // // 第四步:检查上传结果
  1851. // if (!uploadRes || !uploadRes.value) {
  1852. // // this.$message.error('文件上传失败!');
  1853. // return
  1854. // }
  1855. // // 第五步:文件上传成功后,再更新数据
  1856. // const fileInfo = uploadRes.value
  1857. // // 创建更新数据对象
  1858. // const updateData = {
  1859. // ...row,
  1860. // fileUrl: fileInfo?.savePath, // 更新扫描件URL
  1861. // }
  1862. // // 第六步:调用更新API
  1863. // // await updateCostProjectDocument(updateData)
  1864. // // // 第七步:更新成功,显示提示并刷新
  1865. // // this.$message.success('文件上传成功并更新数据!')
  1866. // // this.$emit('refresh', this.project.projectId) // 通知父组件刷新
  1867. // } catch (error) {
  1868. // // 错误处理
  1869. // this.$message.error('操作失败:' + (error.message || '未知错误'))
  1870. // } finally {
  1871. // // 关闭遮罩层
  1872. // loading.close()
  1873. // }
  1874. // }
  1875. // // 触发文件选择
  1876. // input.click()
  1877. // },
  1878. // 文件上传前验证
  1879. beforeMaterialUpload(file) {
  1880. const allowedTypes = [
  1881. 'application/pdf',
  1882. 'application/msword',
  1883. 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  1884. 'application/vnd.ms-excel',
  1885. 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  1886. 'text/csv',
  1887. ]
  1888. const allowedExtensions = [
  1889. '.pdf',
  1890. '.doc',
  1891. '.docx',
  1892. '.xls',
  1893. '.xlsx',
  1894. '.csv',
  1895. ]
  1896. const fileExtension = '.' + file.name.split('.').pop().toLowerCase()
  1897. // 检查文件格式
  1898. const isCorrectType = allowedTypes.includes(file.type)
  1899. const isCorrectExtension = allowedExtensions.includes(fileExtension)
  1900. if (!isCorrectType && !isCorrectExtension) {
  1901. this.$message.error(
  1902. '只允许上传 pdf, doc, docx, xls, xlsx, csv 格式的文件!'
  1903. )
  1904. return false
  1905. }
  1906. // 检查文件大小 (50MB)
  1907. const isLt50M = file.size / 1024 / 1024 < 50
  1908. if (!isLt50M) {
  1909. this.$message.error('文件大小不能超过 50MB!')
  1910. return false
  1911. }
  1912. return true
  1913. },
  1914. // 自定义上传方法
  1915. async handleMaterialUpload(options) {
  1916. const { file, onProgress, onSuccess, onError } = options
  1917. // 检查是否已经上传了文件
  1918. if (
  1919. this.materialForm.fileList &&
  1920. this.materialForm.fileList.length >= 1
  1921. ) {
  1922. this.$message.warning('只能上传一个文件,请先删除已上传的文件')
  1923. // 手动触发onError回调
  1924. if (onError) {
  1925. onError(new Error('只能上传一个文件'))
  1926. }
  1927. return
  1928. }
  1929. const formData = new FormData()
  1930. formData.append('file', file)
  1931. try {
  1932. // 显示上传进度
  1933. if (onProgress) {
  1934. onProgress({ percent: 0 })
  1935. }
  1936. // 调用上传API
  1937. const uploadRes = await uploadFile('/api/file/v1/upload', formData, {
  1938. onUploadProgress: (progressEvent) => {
  1939. // 计算上传进度
  1940. if (progressEvent.total) {
  1941. const percent = Math.round(
  1942. (progressEvent.loaded * 100) / progressEvent.total
  1943. )
  1944. if (onProgress) {
  1945. onProgress({ percent })
  1946. }
  1947. }
  1948. },
  1949. })
  1950. // 检查上传结果
  1951. if (uploadRes && uploadRes.code === 200 && uploadRes.value) {
  1952. const fileInfo = uploadRes.value
  1953. // 构造文件信息对象,符合element-ui upload组件的格式
  1954. const fileObj = {
  1955. uid: file.uid,
  1956. name: file.name,
  1957. status: 'success',
  1958. size: file.size,
  1959. response: fileInfo,
  1960. url: fileInfo.savePath || fileInfo.url,
  1961. }
  1962. if (onSuccess) {
  1963. onSuccess(fileInfo, fileObj)
  1964. this.materialForm.fileUrl = fileInfo.savePath || fileInfo.url
  1965. }
  1966. this.$message.success(`${file.name} 上传成功`)
  1967. } else {
  1968. throw new Error(uploadRes?.message || '上传失败,请稍后重试')
  1969. }
  1970. } catch (error) {
  1971. console.error('文件上传失败:', error)
  1972. this.$message.error(`文件上传失败:${error.message || '未知错误'}`)
  1973. if (onError) {
  1974. onError(error)
  1975. }
  1976. }
  1977. },
  1978. // 上传成功回调
  1979. handleMaterialUploadSuccess(response, file, fileList) {
  1980. // 更新文件列表,添加文件URL信息
  1981. this.materialForm.fileList = fileList.map((item) => {
  1982. if (item.uid === file.uid && response) {
  1983. return {
  1984. ...item,
  1985. url: response.savePath || response.url || item.url,
  1986. response: response,
  1987. }
  1988. }
  1989. return item
  1990. })
  1991. },
  1992. // 上传进度回调
  1993. handleMaterialUploadProgress(event, file, fileList) {
  1994. // 可以在这里显示上传进度,element-ui 会自动处理
  1995. },
  1996. // 上传失败回调
  1997. handleMaterialUploadError(err, file, fileList) {
  1998. console.error('文件上传错误:', err)
  1999. this.$message.error(`${file.name} 上传失败`)
  2000. // 从文件列表中移除失败的文件
  2001. this.materialForm.fileList = fileList.filter(
  2002. (item) => item.uid !== file.uid
  2003. )
  2004. },
  2005. // 超出文件数量限制
  2006. handleMaterialExceed(files, fileList) {
  2007. this.$message.warning(
  2008. `当前限制选择 5 个文件,本次选择了 ${files.length} 个文件,共选择了 ${fileList.length} 个文件`
  2009. )
  2010. },
  2011. // 移除文件
  2012. handleMaterialRemove(file, fileList) {
  2013. this.materialForm.fileList = fileList
  2014. this.$message.info(`${file.name} 已移除`)
  2015. },
  2016. // 成本调查表分页 - 页码改变
  2017. handleCostSurveyPageChange(page) {
  2018. this.costSurveyPagination.currentPage = page
  2019. // 如果成本调查表数据来自API,可以在这里调用API
  2020. // this.getCostSurveyData()
  2021. },
  2022. // 成本调查表分页 - 每页条数改变
  2023. handleCostSurveySizeChange(size) {
  2024. this.costSurveyPagination.pageSize = size
  2025. this.costSurveyPagination.currentPage = 1
  2026. // 如果成本调查表数据来自API,可以在这里调用API
  2027. // this.getCostSurveyData()
  2028. },
  2029. // 消息通知分页 - 页码改变
  2030. handleMessageNoticePageChange(page) {
  2031. this.messageNoticePagination.currentPage = page
  2032. this.getSendMessage()
  2033. },
  2034. // 消息通知分页 - 每页条数改变
  2035. handleMessageNoticeSizeChange(size) {
  2036. this.messageNoticePagination.pageSize = size
  2037. this.messageNoticePagination.currentPage = 1
  2038. this.getSendMessage()
  2039. },
  2040. },
  2041. }
  2042. </script>
  2043. <style scoped lang="scss">
  2044. .cost-supervision-container {
  2045. width: 80%;
  2046. margin-top: 20px;
  2047. h3 {
  2048. text-align: center;
  2049. margin-top: 0;
  2050. margin-bottom: 20px;
  2051. font-size: 18px;
  2052. font-weight: bold;
  2053. }
  2054. }
  2055. .cost-opinion-section,
  2056. .feedback-section {
  2057. border: 1px solid #dcdcdc;
  2058. border-radius: 4px;
  2059. padding: 20px;
  2060. margin-bottom: 20px;
  2061. background-color: #f9f9f9;
  2062. }
  2063. .opinion-item,
  2064. .feedback-item {
  2065. margin-bottom: 20px;
  2066. display: flex;
  2067. align-items: center;
  2068. label {
  2069. width: 120px;
  2070. margin-bottom: 8px;
  2071. font-weight: bold;
  2072. color: #1549ad;
  2073. }
  2074. }
  2075. .file-info {
  2076. margin-bottom: 10px;
  2077. }
  2078. .file-info a {
  2079. color: #0066cc;
  2080. text-decoration: none;
  2081. }
  2082. .file-info a:hover {
  2083. text-decoration: underline;
  2084. }
  2085. .upload-btn {
  2086. background-color: #007bff;
  2087. color: #fff;
  2088. border: none;
  2089. border-radius: 4px;
  2090. padding: 8px 16px;
  2091. cursor: pointer;
  2092. }
  2093. .upload-btn:hover {
  2094. background-color: #0056b3;
  2095. }
  2096. .cost-period-container {
  2097. display: flex;
  2098. align-items: flex-start;
  2099. }
  2100. .add-cost-year-btn {
  2101. margin-right: 10px;
  2102. }
  2103. .delete-cost-year-btn {
  2104. margin-left: 10px;
  2105. }
  2106. .cost-years-wrapper {
  2107. flex: 1;
  2108. }
  2109. .cost-year-item {
  2110. margin-bottom: 10px;
  2111. display: flex;
  2112. align-items: center;
  2113. }
  2114. .ml10 {
  2115. margin-left: 10px;
  2116. }
  2117. .text-danger {
  2118. color: #d9001b;
  2119. }
  2120. // 类别头行样式
  2121. ::v-deep .category-header-row {
  2122. background-color: #f5f7fa !important;
  2123. td {
  2124. background-color: #f5f7fa !important;
  2125. padding: 12px 16px !important;
  2126. }
  2127. }
  2128. .category-header-cell {
  2129. font-weight: 700;
  2130. color: #303133;
  2131. padding-left: 16px;
  2132. }
  2133. </style>