ListItem.vue 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057
  1. <template>
  2. <div class="data-fill-list-box">
  3. <el-collapse v-model="ActiveKey" @change="CollapseChange">
  4. <template v-for="(item, index) in listDatas" :key="item?.id">
  5. <el-collapse-item
  6. :id="`item-${index}-${item?.id}`" :disabled="item.isBussShow === 2"
  7. :name="`item-${index}-${item?.id}`"
  8. >
  9. <template #title>
  10. <div class="hc-collapse-item-header">
  11. <div class="text-lg truncate item-title">{{ item.name }}</div>
  12. <div class="hc-extra-text-box">
  13. <HcTooltip v-if="item.isCopeTab === 2" keys="wbs_del_table">
  14. <el-button
  15. :disabled="item.isBussShow === 2" plain type="danger"
  16. @click.stop="delClick(item, index)"
  17. >
  18. 删除本表
  19. </el-button>
  20. </HcTooltip>
  21. <HcTooltip keys="wbs_copy_table">
  22. <el-button
  23. :disabled="item.isBussShow === 2" :loading="copyClickLoading" plain
  24. type="primary" @click.stop="copyClick(item, index)"
  25. >
  26. 复制本表
  27. </el-button>
  28. </HcTooltip>
  29. <HcTooltip keys="wbs_hide_table">
  30. <el-button plain type="primary" @click.stop="hideClick(item, index)">
  31. <template v-if="item.isBussShow === 1">隐藏本表</template>
  32. <template v-else>显示本表</template>
  33. </el-button>
  34. </HcTooltip>
  35. <HcTooltip v-if="isStatus != 3" keys="wbs_preview_table">
  36. <el-button
  37. v-if="item.isBussShow === 2 || item.isTabPdf === 1 || item.pdfUrl === '' || item.pdfUrl === null"
  38. disabled plain
  39. type="info"
  40. >
  41. 预览
  42. </el-button>
  43. <el-button v-else plain type="primary" @click.stop="previewClick(item, index)">
  44. 预览
  45. </el-button>
  46. </HcTooltip>
  47. <HcTooltip keys="wbs_upload_table">
  48. <el-button
  49. :disabled="item.isBussShow === 2"
  50. :type="item.tabFileType === 2 ? 'success' : 'primary'"
  51. plain
  52. @click.stop="uploadClick(item, index)"
  53. >
  54. <template v-if="item.tabFileType === 2">已上传</template>
  55. <template v-else>上传</template>
  56. </el-button>
  57. </HcTooltip>
  58. </div>
  59. </div>
  60. </template>
  61. <div class="data-fill-list-item-content">
  62. <div class="data-fill-table-form-box">
  63. <div :id="`table-form-${item?.id}`" class="hc-excel-table-form-view" />
  64. <div v-if="item?.isTableForm === false" class="hc-no-table-form">
  65. <div class="table-form-no">
  66. <img :src="notableform" alt="">
  67. <div class="desc">暂无表单数据</div>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="data-fill-table-tip-box">
  72. <div class="text-orange tip-title">
  73. <HcIcon fill name="error" ui="text-2xl" />
  74. <span class="ml-1">提示</span>
  75. </div>
  76. <div class="text-gray-400 tip-item">
  77. 1、灰色框代表可通过系统识别计算,公式自动引用,可通过公式计算少量数据,(表头数据及简单),也可只填写白色框数据
  78. </div>
  79. <div class="text-gray-400 tip-item">
  80. 2、系统支持键盘中,shift +
  81. tab键向上一个填报框切换,tab向下一个填报框切换。暂不支持上下按键切换输入框
  82. </div>
  83. <div class="table-tip-foot">
  84. <div class="tip-left-btn">
  85. <HcTooltip keys="wbs_import_table">
  86. <div class="text-gray-400 dow-text">
  87. <HcIcon name="publish" ui="text-lg" />
  88. <span class="ml-1">导入列表数据</span>
  89. </div>
  90. </HcTooltip>
  91. <HcTooltip keys="wbs_download_table">
  92. <div class="text-main dow-text">
  93. <HcIcon name="file_download" ui="text-lg" />
  94. <span class="ml-1">下载导入模板</span>
  95. </div>
  96. </HcTooltip>
  97. </div>
  98. <div class="tip-right-btn">
  99. <HcTooltip keys="wbs_save_table">
  100. <el-button
  101. :disabled="item?.isTableForm === false"
  102. :loading="tableFormSaveLoading" hc-btn
  103. type="primary"
  104. @click="tableFormSaveClick(item, index)"
  105. >
  106. <HcIcon name="save" />
  107. <span>保存</span>
  108. </el-button>
  109. </HcTooltip>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </el-collapse-item>
  115. </template>
  116. </el-collapse>
  117. </div>
  118. <!-- 右键菜单 -->
  119. <HcContextMenu ref="contextMenuRef" :datas="tableFormMenu" @item-click="handleMenuSelect" />
  120. <!-- 上传文件 -->
  121. <hc-new-dialog v-model="uploadModal" :footer="false" title="上传文件" widths="38rem">
  122. <HcUpload :datas="uploadData" :file-list="fileListData" @change="uploadChange" />
  123. </hc-new-dialog>
  124. <!-- 插入设计值/频率 -->
  125. <hc-new-dialog v-model="IDVFModal" save-text="确认插入" title="插入设计值/频率" widths="600px" @close="closeIDVFModal" @save="IDVFModalSaveClick">
  126. <el-alert :closable="false" title="填写完设计值和频率,系统自动计算实测值" type="warning" />
  127. <el-form ref="formIDVFRef" :model="formIDVFModel" label-width="auto" size="large">
  128. <div class="form-item-div text-center mb-3">
  129. <el-radio-group v-model="formIDVFModel.type" size="large">
  130. <el-radio :value="1">公路工程</el-radio>
  131. <el-radio :value="2" class="ml-4">水利水电</el-radio>
  132. </el-radio-group>
  133. </div>
  134. <el-form-item label="设计值">
  135. <!-- onkeyup="value = value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g,'$1')" -->
  136. <el-input v-model="formIDVFModel.design" placeholder="如果设计值存在两个,则使用 '/' 连接,例如12/23" />
  137. </el-form-item>
  138. <el-form-item v-if="formIDVFModel.type === 1" label="频率">
  139. <!-- onkeyup="value = value.replace(/^(0+)|[^\d]+/g,'')" -->
  140. <el-input
  141. v-model="formIDVFModel.size"
  142. placeholder="如果设计值使用 '/' 连接,则频率也是用 '/' 连接,例如5/10"
  143. />
  144. </el-form-item>
  145. <el-form-item v-if="formIDVFModel.type === 2" label="容量">
  146. <!-- onkeyup="value = value.replace(/^(0+)|[^\d]+/g,'')" -->
  147. <el-input
  148. v-model="formIDVFModel.capacity"
  149. placeholder="如果容量存在两个,则使用 '*',或者 '/' 连接例如2*4,5/7"
  150. />
  151. </el-form-item>
  152. <el-form-item label="合格点数">
  153. <el-input
  154. v-model="formIDVFModel.pass"
  155. placeholder="如果设计值使用 '/' 连接,则合格点数也是用 '/' 连接,例如2/5"
  156. />
  157. </el-form-item>
  158. <el-form-item label="偏差范围">
  159. <el-input
  160. v-model="formIDVFModel.dev"
  161. placeholder="如果设计值使用 '/' 连接,则偏差范围也是用 '/' 连接,例如±2/±3"
  162. />
  163. </el-form-item>
  164. </el-form>
  165. </hc-new-dialog>
  166. <!-- 插入特殊字符 -->
  167. <hc-new-dialog v-model="specialModal" save-text="确认插入" title="插入特殊字符" widths="600px" @save="specialNodeClick">
  168. <el-form
  169. ref="specialFormRef" :model="specialFormModel" :rules="specialFormRules" class="mb-6" label-width="0px"
  170. size="large"
  171. >
  172. <el-form-item class="special-form-item" prop="val">
  173. <el-input
  174. id="specialId" ref="specialRef" v-model="specialFormModel.val"
  175. clearable placeholder="请选择特殊字符代码" @blur="specialInputBlur"
  176. />
  177. </el-form-item>
  178. </el-form>
  179. <el-row :gutter="20" style="margin: -10px;">
  180. <el-col v-for="item in specialCharacters" :span="3" style="padding: 10px;">
  181. <div class="special-box" @click="specialClick">
  182. <span :title="`字符代码(C):${item !== 'K̅' ? item.slice(2, 7) : 'K̅'}`" class="font-EUDC" v-html="item" />
  183. </div>
  184. </el-col>
  185. </el-row>
  186. </hc-new-dialog>
  187. <!-- 关联试验数据 -->
  188. <hc-new-dialog v-model="CTDModal" :footer="false" title="关联试验数据" widths="84%">
  189. <div class="adding-form-dialog-box">
  190. <div class="dialog-tree-box">
  191. <el-scrollbar>
  192. <ElTree
  193. ref="ElTreeRef"
  194. :auto-expand-keys="CTDTreeAutoExpandKeys"
  195. :default-expanded-keys="defaultExpandedCids"
  196. :indent="0"
  197. :load="ElTreeLoadNode"
  198. :props="ElTreeProps"
  199. accordion
  200. class="hc-tree-node tree-line"
  201. highlight-current
  202. lazy
  203. node-key="primaryKeyId"
  204. @node-click="CTDElTreeClick"
  205. />
  206. </el-scrollbar>
  207. </div>
  208. <div class="dialog-table-box">
  209. <div class="dialog-search">
  210. <div class="w-64 ml-2">
  211. <HcDatePicker :dates="CTDbetweenTime" clearable @change="CTDbetweenTimeUpdate" />
  212. </div>
  213. <div class="ml-2">
  214. <el-button type="primary" @click="CTDsearchClick">
  215. <HcIcon name="search-2" />
  216. <span>搜索</span>
  217. </el-button>
  218. </div>
  219. </div>
  220. <div class="dialog-table">
  221. <HcTable
  222. :column="CTDdialogTableColumn" :datas="CTDdialogTableData1"
  223. :loading="CTDdialogTableLoading" is-new :index-style="{ width: 60 }"
  224. >
  225. <template #recordNo="{ row }">
  226. <span class="text-link" @click="CTDtableRowName(row)">{{ row?.recordNo }}</span>
  227. </template>
  228. </HcTable>
  229. </div>
  230. <div class="dialog-pages">
  231. <HcPages :pages="CTDsearchFormPage" @change="CTDsearchFormPageChange" />
  232. </div>
  233. </div>
  234. </div>
  235. </hc-new-dialog>
  236. <!-- 选择要插入的数据 -->
  237. <hc-new-dialog v-model="insertDataShow" save-text="保存" title="选择需要插入的数据" widths="84%" @close="cancelinsertData" @save="submitinsertData">
  238. <div>
  239. <div class="flex-1" style="padding-left:20px">
  240. <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" :round="false" size="default" @change="tabTypeChange" />
  241. <el-select
  242. v-model="testReportId" :loading="insertDataSelectoading" :placeholder="placeholderType"
  243. class="ml-2 w-80"
  244. clearable @change="testReportIdchange"
  245. >
  246. <el-option
  247. v-for="item in testReportData" :key="item.id" :label="item.fullName"
  248. :value="item.id"
  249. />
  250. </el-select>
  251. </div>
  252. <div class="dialog-table-box">
  253. <!-- <div class="dialog-table">
  254. <HcTable :column="insertDataTableColumn" :datas="insertDataTable" :loading="insertDataTableLoading">
  255. <template #tempLow="{row}">{{row['tempLow']}} ~ {{row['tempHigh']}}</template>
  256. <template #action="{row}">
  257. <el-checkbox size="large" @change="insertDataTableCheck(row)"/>
  258. </template>
  259. </HcTable>
  260. </div> -->
  261. <!-- <div class="dialog-pages">
  262. <HcPages :pages="insertDataPage" @change="insertDataPageChange"/>
  263. </div> -->
  264. <div class="copy-node-many-table">
  265. <el-scrollbar v-loading="insertDataTableLoading">
  266. <el-table :data="insertDataTable" border @selection-change="insertDataTableCheck">
  267. <el-table-column type="selection" width="55" />
  268. <el-table-column label="数据名称" prop="key_12__3_1" />
  269. <!-- <el-table-column prop="action" label="操作" width="120" align="center">
  270. <template #default="{row}">
  271. <el-checkbox size="large" @change="insertDataTableCheck(row)"/>
  272. </template> -->
  273. <!-- </el-table-column> -->
  274. </el-table>
  275. </el-scrollbar>
  276. </div>
  277. </div>
  278. </div>
  279. </hc-new-dialog>
  280. <!-- 复制本表 -->
  281. <hc-new-dialog v-model="CopyModal" save-text="确认复制" title="复制本表" widths="1200px">
  282. <el-alert
  283. :closable="false" title="复跨节点复制: 把当前表格已形成的数据复制到其他工程部位的相同表格里面"
  284. type="warning"
  285. />
  286. <el-alert :closable="false" title="本节点复制:在当前节点内复制本表及数据" type="warning" />
  287. <div class="radio-group-box">
  288. <el-radio-group v-model="CopyModalType">
  289. <el-radio value="1">跨节点复制</el-radio>
  290. <el-radio class="ml-4" value="2">本节点复制</el-radio>
  291. </el-radio-group>
  292. </div>
  293. <div v-if="CopyModalType === '1'" class="copy-node-many-box">
  294. <div class="copy-node-many-tree">
  295. <el-scrollbar>
  296. <WbsTree
  297. :contract-id="contractId"
  298. :project-id="projectId"
  299. @node-loading="ElTreeNodeLoading"
  300. @node-tap="wbsElTreeClick"
  301. />
  302. </el-scrollbar>
  303. </div>
  304. <div class="copy-node-many-table">
  305. <el-scrollbar v-loading="ListItemLoading">
  306. <el-table :data="copyModalTable" border>
  307. <el-table-column label="表格名称" prop="fullName" />
  308. <el-table-column align="center" label="操作" prop="action" width="120">
  309. <template #default="{ row }">
  310. <el-checkbox v-model="row.isCheck" size="large" @change="copyModalTableCheck(row)" />
  311. </template>
  312. </el-table-column>
  313. </el-table>
  314. </el-scrollbar>
  315. </div>
  316. </div>
  317. </hc-new-dialog>
  318. <!-- 关联试验文件 -->
  319. <hc-new-dialog v-model="fileModal" save-text="保存" title="关联试验文件" widths="84%" @save="savefileModal">
  320. <div class="radio-box">
  321. <el-radio-group v-model="fileModalradio" @change="radioChange">
  322. <el-radio :label="1">试验检测</el-radio>
  323. <el-radio :label="2">第三方检测</el-radio>
  324. <el-radio :label="3">外委检测</el-radio>
  325. </el-radio-group>
  326. </div>
  327. <div class="adding-form-dialog-box">
  328. <div class="dialog-tree-box">
  329. <el-scrollbar>
  330. <!-- 试验检测树 -->
  331. <ElTree
  332. v-if="fileModalradio == 1"
  333. :indent="0"
  334. :load="ElTreeLoadNode"
  335. :props="ElTreeProps"
  336. accordion
  337. class="hc-tree-node tree-line"
  338. highlight-current
  339. lazy
  340. node-key="primaryKeyId"
  341. @node-click="fileModalElTreeClick"
  342. />
  343. <!-- 第三方树 -->
  344. <ElTree
  345. v-else
  346. ref="ElTreeRef2" :data="thirdtreeDatas" :indent="0" :props="thirdElTreeProps"
  347. accordion class="hc-tree-node" highlight-current
  348. node-key="id" @node-click="thirdtreeDatasElTreeClick"
  349. />
  350. </el-scrollbar>
  351. </div>
  352. <div class="dialog-table-box">
  353. <div class="dialog-search">
  354. <div class="w-64 ml-2">
  355. <HcDatePicker :dates="filebetweenTime" clearable @change="filebetweenTimeUpdate" />
  356. </div>
  357. <div class="ml-2">
  358. <el-button type="primary" @click="filesearchClick">
  359. <HcIcon name="search-2" />
  360. <span>搜索</span>
  361. </el-button>
  362. </div>
  363. </div>
  364. <div class="dialog-table">
  365. <HcTable
  366. v-if="fileModalradio == 1" ref="dialogTableRef1" :column="filedialogTableColumn"
  367. :datas="filedialogTableData" :loading="filedialogTableLoading"
  368. is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
  369. @selection-change="filedialogTableSelection1"
  370. >
  371. <template #recordNo="{ row }">
  372. <span :class="[row?.isSelectedStatus == 1 ? 'text-green' : '']">{{ row?.recordNo }}</span>
  373. </template>
  374. </HcTable>
  375. <HcTable
  376. v-if="fileModalradio == 2" ref="dialogTableRef2" :column="filedialogTableColumn1"
  377. :datas="filedialogTableData" :loading="filedialogTableLoading"
  378. is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
  379. @selection-change="filedialogTableSelection"
  380. >
  381. <template #reportNo="{ row }">
  382. <span :class="[row?.isSelectedStatus === 1 ? 'text-green' : '']">{{ row?.reportNo }}</span>
  383. </template>
  384. </HcTable>
  385. <HcTable
  386. v-if="fileModalradio == 3" ref="dialogTableRef" :column="filedialogTableColumn1"
  387. :datas="filedialogTableData" :loading="filedialogTableLoading"
  388. is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
  389. @selection-change="filedialogTableSelection"
  390. >
  391. <template #reportNo="{ row }">
  392. <span :class="[row?.isSelectedStatus === 1 ? 'text-green' : '']">{{ row?.reportNo }}</span>
  393. </template>
  394. </HcTable>
  395. </div>
  396. <div class="dialog-pages">
  397. <HcPages :pages="filesearchFormPage" @change="filesearchFormPageChange" />
  398. </div>
  399. </div>
  400. </div>
  401. </hc-new-dialog>
  402. </template>
  403. <script setup>
  404. import { nextTick, ref, watch } from 'vue'
  405. import { getStoreValue, setStoreValue } from '~src/utils/storage'
  406. import notableform from '~src/assets/view/notableform.svg'
  407. import HTableForm from '~src/plugins/HTableForm'
  408. import WbsTree from '../components/WbsTree.vue'
  409. import wbsApi from '~api/data-fill/wbs'
  410. import firstApi from '~api/other/first-item'
  411. import dataApi from '~api/tentative/detect/test'
  412. import thirdApi from '~api/tentative/detect/third'
  413. import { getTreeAll } from '~api/tentative/detect'
  414. import HcUpload from './HcUpload.vue'
  415. import samplingApi from '~api/tentative/material/sampling'
  416. import { useAppStore } from '~src/store'
  417. import {
  418. deepClone,
  419. formValidate,
  420. getArrValue,
  421. getObjVal,
  422. getObjValue,
  423. isString,
  424. setPosInsert,
  425. setPosRange,
  426. } from 'js-fast-way'
  427. import { toPdfPage } from '~uti/btn-auth'
  428. //初始
  429. const props = defineProps({
  430. datas: {
  431. type: Array,
  432. default: () => ([]),
  433. },
  434. classify: {
  435. type: [String, Number],
  436. default: '',
  437. },
  438. status: {
  439. type: [String, Number],
  440. default: '',
  441. },
  442. primaryKeyId: {
  443. type: [String, Number],
  444. default: '',
  445. },
  446. contractId: {
  447. type: [String, Number],
  448. default: '',
  449. },
  450. projectInfo: {
  451. type: Object,
  452. default: () => ({}),
  453. },
  454. authBtnTabKey: {
  455. type: [String, Number],
  456. default: '',
  457. },
  458. drawType: {
  459. type: Boolean,
  460. default: false,
  461. },
  462. wbsTempId: {
  463. type: [String, Number],
  464. default: '',
  465. },
  466. tenantId: {
  467. type: [String, Number],
  468. default: '',
  469. },
  470. wbsType: {
  471. type: [String, Number],
  472. default: '',
  473. },
  474. treeItem: {
  475. type: Object,
  476. default: () => ({}),
  477. },
  478. tableFileData: {
  479. type: Array,
  480. default: () => ([]),
  481. },
  482. finishFile: {
  483. type: Object,
  484. default: () => ({}),
  485. },
  486. })
  487. //事件
  488. const emit = defineEmits(['renew', 'offsetTop'])
  489. const listDatas = ref(props.datas)
  490. const classify = ref(props.classify)
  491. const isStatus = ref(props.status)
  492. const isPrimaryKeyId = ref(props.primaryKeyId)
  493. const contractId = ref(props.contractId)
  494. const projectInfo = ref(props.projectInfo)
  495. const useAppState = useAppStore()
  496. const authBtnTabKey = ref(props.authBtnTabKey)
  497. const drawType = ref(props.drawType)
  498. const wbsTempId = ref(props.wbsTempId)
  499. const tenantId = ref(props.tenantId)
  500. const wbsType = ref(props.wbsType)
  501. const treeItem = ref(props.treeItem)
  502. const tableFileData = ref(props.tableFileData)
  503. const finishFile = ref(props.finishFile)
  504. //全局变量
  505. const projectId = ref(useAppState.getProjectId)
  506. //监听
  507. watch(() => [
  508. props.datas,
  509. props.classify,
  510. props.primaryKeyId,
  511. props.contractId,
  512. props.projectInfo,
  513. props.treeItem,
  514. props.tableFileData,
  515. props.finishFile,
  516. ], ([datas, classifyVal, primaryKeyId, cid, pInfo, TreeItem, TableFileData, FinishFile]) => {
  517. listDatas.value = datas
  518. classify.value = classifyVal
  519. isPrimaryKeyId.value = primaryKeyId
  520. contractId.value = cid
  521. projectInfo.value = pInfo
  522. treeItem.value = TreeItem
  523. tableFileData.value = TableFileData
  524. finishFile.value = FinishFile
  525. setFormDataNum(datas)
  526. })
  527. //监听
  528. // watch(() => [
  529. // props.status
  530. // ], ([val]) => {
  531. // //1 未填报,2待上报,3已上报
  532. // isStatus.value = val
  533. // })
  534. //监听
  535. watch(() => [
  536. props.autoExpandKeys,
  537. props.projectId,
  538. props.contractId,
  539. props.wbsTempId,
  540. props.tenantId,
  541. props.wbsType,
  542. props.status,
  543. ], ([expandKeys, UserProjectId, UserContractId, UserWbsTempId, UserTenantId, UserIdPrefix, wbs_type, val]) => {
  544. projectId.value = UserProjectId
  545. contractId.value = UserContractId
  546. wbsTempId.value = UserWbsTempId
  547. tenantId.value = UserTenantId
  548. wbsType.value = wbs_type
  549. isStatus.value = val
  550. })
  551. //渲染完成
  552. nextTick(() => {
  553. setFormDataNum(props.datas)
  554. })
  555. //获取表单初始数据
  556. const getFormDataInit = (item, pkeyId) => {
  557. return {
  558. projectId: item?.projectId,
  559. contractId: item?.contractId,
  560. classify: classify.value,
  561. pkeyId: pkeyId ? pkeyId + '' : '',
  562. nodeId: isPrimaryKeyId.value,
  563. }
  564. }
  565. //设置表单对象的数量
  566. const formData = ref([])
  567. const setFormDataNum = (datas) => {
  568. ActiveKey.value = []
  569. let newArr = []
  570. for (let i = 0; i < datas.length; i++) {
  571. newArr.push({
  572. ...getFormDataInit(datas[i], datas[i].pkeyId),
  573. isCollapseLoad: false,
  574. })
  575. }
  576. formData.value = newArr
  577. setTableFormMenu(projectInfo.value)
  578. }
  579. //展开事件
  580. const ActiveKey = ref([])
  581. const formKeyIds = ref('')
  582. const CollapseChange = async (name) => {
  583. console.log(name, 'name')
  584. ActiveKey.value = name
  585. console.log(name, 'name')
  586. let names = []
  587. if (name.length > 0) {
  588. names = name[0] ? name[name.length - 1].split('-') : name[0]
  589. }
  590. console.log(names, 'names')
  591. if (names.length > 0) {
  592. getOffsetTop(name)
  593. const index = names[1]
  594. const item = listDatas.value[index]
  595. formKeyIds.value = item.id ? item.id + '' : ''
  596. if (!item.isTableFormRender) {
  597. //获取已填写的数据
  598. await getBussDataInfo(item, item.id, index)
  599. //渲染表单
  600. await getExcelHtml(item, index)
  601. }
  602. } else {
  603. getOffsetTop()
  604. formKeyIds.value = ''
  605. }
  606. }
  607. //获取模板标签数据
  608. const formRegExpJson = ref({})
  609. const getExcelHtml = async (item, index) => {
  610. const pkeyIds = item.id ? item.id + '' : ''
  611. if (pkeyIds) {
  612. const { error, code, data } = await firstApi.getFirstExcelHtml({ contractId: contractId.value }, false)
  613. // const resData = isString(data) ? data || '' : ''
  614. //处理数据
  615. const resData = isString(data?.data) ? data?.data || '' : ''
  616. if (!error && code === 200 && resData) {
  617. item.isTableForm = true
  618. //渲染表单
  619. HTableForm.createForm({
  620. template: resData,
  621. tableForm: formData.value[index],
  622. appId: `#table-form-${pkeyIds}`,
  623. onRight: (event, KeyName) => {
  624. onRightClick(event, KeyName, index)
  625. },
  626. //表单正则效验
  627. onBlur: (event, key, reg, val, msg, leng) => {
  628. setTableFormBlurReg(pkeyIds, event, key, reg, val, msg, item, index, leng)
  629. },
  630. })
  631. item.isTableFormRender = true
  632. item.isRenderTableForm = true
  633. } else {
  634. item.isTableForm = false
  635. item.isRenderTableForm = true
  636. window?.$message?.warning('暂无表单')
  637. }
  638. } else {
  639. item.isTableForm = false
  640. item.isRenderTableForm = false
  641. window?.$message?.warning('pkeyId为空')
  642. }
  643. }
  644. //正则效验
  645. const setTableFormBlurReg = (pkeyId, event, key, reg, val, msg, item, index, leng) => {
  646. const dom = document.getElementById(key)?.parentElement ?? ''
  647. if (dom) {
  648. if (val && reg) {
  649. let regx = new RegExp(reg)
  650. let state = regx.test(val)
  651. if (state) {
  652. delete formRegExpJson.value[pkeyId]
  653. dom.style = ''
  654. } else {
  655. formRegExpJson.value[pkeyId] = {
  656. key,
  657. reg,
  658. val,
  659. msg,
  660. state,
  661. nodeName: item.nodeName,
  662. itemId: `item-${index}-${item?.pkeyId}`,
  663. }
  664. dom.style = '--el-input-border-color: #fe0000; box-shadow: 0 0 0 2px #fe0000 inset;'
  665. window?.$message?.warning(msg)
  666. }
  667. } else {
  668. delete formRegExpJson.value[pkeyId]
  669. dom.style = ''
  670. }
  671. /*let efficacyRegState = true, efficacyLengState = true;
  672. //正则效验
  673. if (val && reg) {
  674. let regx = new RegExp(reg);
  675. let state = regx.test(val);
  676. console.log('reg:', reg)
  677. console.log('val:', val)
  678. console.log('state:', state)
  679. if (!state) {
  680. efficacyRegState = true
  681. } else {
  682. efficacyRegState = false
  683. window?.$message?.warning(msg)
  684. }
  685. } else {
  686. efficacyRegState = true
  687. }
  688. //校验字符长度
  689. if (val && leng) {
  690. const num = val.toString().length;
  691. if (num > leng) {
  692. efficacyLengState = false
  693. window?.$message?.warning('长度不能超过' + leng)
  694. } else {
  695. efficacyLengState = true
  696. }
  697. } else {
  698. efficacyLengState = true
  699. }
  700. //处理效验结果
  701. if (efficacyRegState && efficacyLengState) {
  702. delete formRegExpJson.value[pkeyId]
  703. dom.style = ''
  704. } else {
  705. formRegExpJson.value[pkeyId] = {key, reg, val, msg, leng, state: efficacyRegState, lengState: efficacyLengState, nodeName: item.nodeName, itemId: `item-${index}-${item?.pkeyId}`}
  706. dom.style = '--el-input-border-color: #fe0000; box-shadow: 0 0 0 2px #fe0000 inset;'
  707. }*/
  708. }
  709. }
  710. //获取已填写的数据
  711. const getBussDataInfo = async (item, pkeyId, index) => {
  712. const pkeyIds = pkeyId ? pkeyId + '' : ''
  713. if (pkeyIds) {
  714. const { error, code, data } = await firstApi.getFirstBussDataInfo({
  715. contractId: contractId.value || '',
  716. firstId: pkeyId + '',
  717. }, false)
  718. const resData = getObjVal(data)
  719. if (!error && code === 200 && resData) {
  720. HTableForm.setPickerKey(resData)
  721. const InitObj = getFormDataInit(item, pkeyId) //有数据,关联数据
  722. formData.value[index] = { ...resData, ...InitObj, isCollapseLoad: true }
  723. } else {
  724. formData.value[index] = { ...getFormDataInit(item, pkeyId), isCollapseLoad: true }
  725. }
  726. } else {
  727. window?.$message?.warning('pkeyId为空')
  728. }
  729. }
  730. //单个保存
  731. const tableFormSaveLoading = ref(false)
  732. const tableFormSaveClick = async (item, index) => {
  733. if (isStatus.value !== '3') {
  734. console.log(item)
  735. const res = await saveExcelBussData(item, index)
  736. console.log(res, 'res')
  737. if (res) {
  738. await getBussPdfInfo(item, true, res)
  739. renewData()
  740. }
  741. } else {
  742. window?.$message?.warning('已上报的资料,不允许保存。')
  743. }
  744. }
  745. //处理数据
  746. const rowsToArr = (rows) => {
  747. let newArr = []
  748. for (let i = 0; i < rows.length; i++) {
  749. newArr.push({
  750. id: rows[i]?.id,
  751. name: rows[i]?.name,
  752. })
  753. }
  754. return newArr
  755. }
  756. //保存表单数据
  757. const saveExcelBussData = async (item, index, showTip = true) => {
  758. const isRegExp = !!getObjVal(formRegExpJson.value)
  759. if (!isRegExp) {
  760. tableFormSaveLoading.value = true
  761. const InitObj = getFormDataInit(item, item.id)
  762. // const {error, code} = await firstApi.saveBussData({
  763. // ...formData.value[index],
  764. // ...InitObj
  765. // })
  766. const info = treeItem.value
  767. const { primaryKeyId } = treeItem.value
  768. console.log(primaryKeyId, 'primaryKeyId')
  769. const linkIds = rowsToArr(tableFileData.value)
  770. console.log(formData.value[index], 'formData')
  771. const { error, code, data } = await firstApi.saveBussData({
  772. ...formData.value[index],
  773. projectId: projectId.value,
  774. contractId: contractId.value,
  775. firstNodeId: primaryKeyId,
  776. pkeyId: info.id,
  777. classify: '1',
  778. isFirst: 1,
  779. linkProcessList: linkIds,
  780. ...finishFile.value,
  781. }, false)
  782. //处理数据
  783. tableFormSaveLoading.value = false
  784. if (!error && code === 200) {
  785. if (showTip) window?.$message?.success('保存成功')
  786. return data
  787. } else {
  788. return false
  789. }
  790. } else {
  791. window?.$message?.warning('请先修改完红色输入框的数据')
  792. return false
  793. }
  794. }
  795. //预览PDF
  796. const getBussPdfInfo = async (item, showTip = true, resid) => {
  797. console.log(resid, 'resid')
  798. const pkeyIds = item.id ? item.id + '' : ''
  799. if (pkeyIds) {
  800. const { error, code, data } = await firstApi.getFirstBussPdfInfo({
  801. firstId: resid ? resid : pkeyIds,
  802. }, false)
  803. if (!error && code === 200) {
  804. if (data) {
  805. toPdfPage(data)
  806. //window.open(data, '_blank')
  807. } else if (showTip) {
  808. window?.$message?.warning('PDF错误')
  809. }
  810. } else {
  811. if (showTip) {
  812. window?.$message?.warning(data.msg || '获取PDF失败')
  813. }
  814. }
  815. } else {
  816. window?.$message?.warning('pkeyId为空')
  817. }
  818. }
  819. //删除本表
  820. const delClick = async (item) => {
  821. const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
  822. if (pkeyIds) {
  823. if (isStatus.value !== '3') {
  824. const { error, code } = await wbsApi.removeBussTabInfo({
  825. pkeyid: pkeyIds,
  826. classify: classify.value,
  827. })
  828. if (!error && code === 200) {
  829. window?.$message?.success('操作成功')
  830. renewData()
  831. }
  832. } else {
  833. window?.$message?.warning('已上报的资料,不允许删除')
  834. }
  835. } else {
  836. window?.$message?.warning('pkeyId为空')
  837. }
  838. }
  839. //复制本表弹窗
  840. const CopyModal = ref(false)
  841. const CopyModalType = ref('1')
  842. const treeLoading = ref(false)
  843. const copyModalTable = ref([])
  844. const insertDataShow = ref(false)
  845. //类型tab数据和相关处理
  846. const tabTypeKey = ref('2')
  847. const tabTypeTab = ref([
  848. { key: '1', name: '试验记录表' },
  849. { key: '2', name: '试验报告单' },
  850. ])
  851. let placeholderType = ref('试验报告单')
  852. const tabTypeChange = ({ key }) => {
  853. tabTypeKey.value = key
  854. if (tabTypeKey.value === '1') {
  855. placeholderType.value = '试验记录表'
  856. } else {
  857. placeholderType.value = '试验报告单'
  858. }
  859. testReportId.value = ''
  860. getSearchNodeTables()
  861. }
  862. const insertDataTableLoading = ref(false)
  863. const insertDataTableColumn = ref(
  864. [{ key: 'key_12__3_1', name: '数据名称' }],
  865. )
  866. const insertDataTable = ref([])
  867. const multipleSelection = ref([])
  868. const insertDataTableCheck = (val) => {
  869. multipleSelection.value = val
  870. }
  871. //分页
  872. const insertDataPage = ref({ current: 1, size: 20, total: 0 })
  873. const insertDataPageChange = ({ current, size }) => {
  874. insertDataPage.value.current = current
  875. insertDataPage.value.size = size
  876. // getDialogTableData()
  877. }
  878. const testReportId = ref('')
  879. const testReportData = ref([])
  880. let checPkd = ref([])
  881. const testReportIdchange = (key) => {
  882. testReportData.value.forEach((item) => {
  883. if (item.id = key) {
  884. checPkd.value.push(item)
  885. }
  886. })
  887. getBussddataInfotrialData()
  888. }
  889. //树相关变量
  890. // const primaryKeyId = ref('')
  891. const nodeItemInfo = ref({})
  892. const nodeDataInfo = ref({})
  893. //树加载完成
  894. const ElTreeNodeLoading = () => {
  895. treeLoading.value = false
  896. }
  897. //获取数据列表
  898. const ListItemLoading = ref(false)
  899. const checked1 = ref(true)
  900. const searchNodeAllTable = async () => {
  901. copyModalTable.value = []
  902. const info = nodeDataInfo.value
  903. ListItemLoading.value = true
  904. const { error, code, data } = await wbsApi.searchNodeAllTable({
  905. projectId: projectId.value,
  906. contractId: contractId.value,
  907. primaryKeyId: info['primaryKeyId'],
  908. type: authBtnTabKey.value,
  909. })
  910. //处理数据
  911. ListItemLoading.value = false
  912. if (!error && code === 200) {
  913. copyModalTable.value = getArrValue(data)
  914. copyModalTable.value.forEach((item) => {
  915. item.isCheck = false
  916. })
  917. } else {
  918. copyModalTable.value = []
  919. }
  920. }
  921. const getTableDataAll = () => {
  922. searchNodeAllTable()
  923. }
  924. //树被点击
  925. const wbsElTreeClick = ({ node, data, keys }) => {
  926. nodeItemInfo.value = node
  927. nodeDataInfo.value = data
  928. getTableDataAll()
  929. }
  930. const copyClickLoading = ref(false)
  931. //复制本表
  932. const copyClick = async (item, index) => {
  933. // CopyModal.value=true;
  934. // const copyModalTable=ref([])
  935. if (item.id) {
  936. if (isStatus.value !== '3') {
  937. copyClickLoading.value = true
  938. if (!item.isRenderTableForm) {
  939. await copeBussTab(item.id + '')
  940. } else if (!item.isTableForm) {
  941. window?.$message?.warning('暂无表单数据')
  942. } else if (item.isRenderTableForm) {
  943. const res = await saveExcelBussData(item, index, false)
  944. if (res) {
  945. await copeBussTab(item.id + '')
  946. } else {
  947. window?.$message?.warning('复制本表操作失败')
  948. }
  949. } else {
  950. window?.$message?.warning(`数据异常了, isRenderTableForm: ${item.isRenderTableForm}, isTableForm: ${item.isTableForm}, pkeyIds:${item.pkeyId}`)
  951. }
  952. } else {
  953. window?.$message?.warning('已上报的资料,不允许复制')
  954. }
  955. } else {
  956. window?.$message?.warning('pkeyId为空')
  957. }
  958. }
  959. //勾选复制本表
  960. const copyModalTableCheck = async (item) => {
  961. console.log('复制本表', item)
  962. }
  963. const copeBussTab = async (pkeyIds) => {
  964. const { error, code } = await wbsApi.copeBussTab({
  965. pkeyId: pkeyIds,
  966. })
  967. if (!error && code === 200) {
  968. window?.$message?.success('操作成功')
  969. renewData()
  970. }
  971. }
  972. //隐藏本表
  973. const hideClick = async (item) => {
  974. const pkeyIds = item.id ? item.id + '' : ''
  975. if (pkeyIds) {
  976. if (isStatus.value !== '3') {
  977. const isBussShow = item['isBussShow'] === 2 ? 1 : 2 //状态(1显示 2隐藏)
  978. const { error, code } = await wbsApi.showBussTab({
  979. pkeyId: pkeyIds,
  980. status: isBussShow,
  981. })
  982. if (!error && code === 200) {
  983. window?.$message?.success('操作成功')
  984. renewData()
  985. }
  986. } else {
  987. window?.$message?.warning('已上报的资料,不允许隐藏')
  988. }
  989. } else {
  990. window?.$message?.warning('pkeyId为空')
  991. }
  992. }
  993. //预览
  994. const previewClick = async (item, index) => {
  995. await getBussPdfInfo(item)
  996. }
  997. //上传变量
  998. const uploadModal = ref(false)
  999. const fileListData = ref([])
  1000. const uploadData = ref({})
  1001. //上传被点击
  1002. const uploadClick = (item, index) => {
  1003. const pkeyIds = item.id ? item.id + '' : ''
  1004. const keyName = `item-${index}-${pkeyIds}`
  1005. if (pkeyIds) {
  1006. if (isStatus.value !== '3' && item.isTableForm) {
  1007. uploadModal.value = true
  1008. uploadData.value = getFormDataInit(item, pkeyIds)
  1009. //获取文件列表
  1010. getBussFileList(pkeyIds)
  1011. } else if (!item.isRenderTableForm) {
  1012. CollapseChange(keyName)
  1013. window?.$message?.warning('请再次点击上传')
  1014. } else if (!item.isTableForm) {
  1015. window?.$message?.warning('暂无表单数据')
  1016. } else {
  1017. window?.$message?.warning('已上报的资料,不允许上传')
  1018. }
  1019. } else {
  1020. window?.$message?.warning('pkeyId为空')
  1021. }
  1022. }
  1023. //获取文件列表
  1024. const getBussFileList = async (pkeyId) => {
  1025. const { error, code, data } = await wbsApi.getBussFileList({
  1026. pkeyid: pkeyId,
  1027. })
  1028. if (!error && code === 200) {
  1029. fileListData.value = getArrValue(data)
  1030. } else {
  1031. fileListData.value = []
  1032. }
  1033. }
  1034. //上传文件
  1035. const uploadChange = async ({ type }) => {
  1036. if (type === 'success') {
  1037. uploadModal.value = false
  1038. renewData()
  1039. } else if (type === 'del') {
  1040. renewData()
  1041. }
  1042. }
  1043. //相关变量
  1044. const tableFormItemNode = ref({})
  1045. //菜单数据
  1046. const tableFormMenu = ref([])
  1047. //设置菜单权限数据
  1048. const setTableFormMenu = (info) => {
  1049. const infos = getObjValue(info)
  1050. const isOpen = infos['isOpenRandomNumber'] ?? 0
  1051. let newArr = []
  1052. if (isOpen === 1) {
  1053. newArr.push({ label: '插入设计值/频率', key: 'IDVF' })
  1054. }
  1055. //newArr.push({label: '插入设计值/频率', key: "IDVF"})
  1056. newArr.push({ label: '插入特殊字符', key: 'special' })
  1057. newArr.push({ label: '关联试验数据', key: 'CTD' }),
  1058. newArr.push({ label: '关联试验文件', key: 'file' })
  1059. tableFormMenu.value = newArr
  1060. }
  1061. //鼠标右键事件
  1062. const contextMenuRef = ref(null)
  1063. const onRightClick = (event, KeyName, index) => {
  1064. //取光标位置
  1065. const specialDom = document.getElementById(KeyName + '')
  1066. const startPos = specialDom?.selectionStart || 0
  1067. const endPos = specialDom?.selectionEnd || 0
  1068. //存储临时信息
  1069. tableFormItemNode.value = { KeyName, index, startPos, endPos, pkeyId: formKeyIds.value }
  1070. contextMenuRef.value?.showMenu(event) //展开菜单
  1071. }
  1072. //鼠标右键菜单被点击
  1073. const handleMenuSelect = ({ key }) => {
  1074. if (key === 'IDVF') {
  1075. IDVFModal.value = true
  1076. } else if (key === 'special') {
  1077. specialModalShow()
  1078. } else if (key === 'CTD') {
  1079. CTDModal.value = true
  1080. CTDbetweenTime.value = []
  1081. CTDdialogTableData1.value = []
  1082. } else if (key === 'file') {
  1083. fileModal.value = true
  1084. fileModalradio.value = 1
  1085. filedialogTableData.value = []
  1086. }
  1087. }
  1088. //插入设计值
  1089. const IDVFModal = ref(false)
  1090. const formIDVFRef = ref(null)
  1091. const formIDVFModel = ref({ type: 1, design: '', size: '', dev: '', key: '', capacity: '', pass: '', pkId: '' })
  1092. //插入特殊字符
  1093. const specialModal = ref(false)
  1094. const specialCharacters = ref([
  1095. '&#57344;', '&#57345;', '&#57346;', '&#57347;', '&#8804;', '&#8805;', '&#8451;',
  1096. '&#9312;', '&#9313;', '&#9314;', '&#9315;', '&#9316;', '&#9317;', '&#9318;', '&#9319;', '&#9320;', '&#9321;', '&#9322;', '&#9323;',
  1097. '&#9324;', '&#9325;', '&#9326;', '&#9327;', '&#9328;', '&#9329;', '&#9330;', '&#9331;',
  1098. '&#8544;', '&#8545;', '&#8546;', '&#8547;', '&#8548;', '&#8549;', '&#8550;', '&#8551;', '&#8552;', '&#8553;', '&#8554;', '&#8555;', 'K̅',
  1099. ])
  1100. //输入框验证
  1101. const specialFormRef = ref(null)
  1102. const specialFormModel = ref({ val: '' })
  1103. const specialFormRules = {
  1104. val: {
  1105. required: true,
  1106. trigger: 'blur',
  1107. message: '请选择特殊字符代码',
  1108. },
  1109. }
  1110. //显示插入特殊字符
  1111. const specialRef = ref(null)
  1112. const specialModalShow = () => {
  1113. specialFormModel.value.val = ''
  1114. specialModal.value = true
  1115. nextTick(() => {
  1116. specialRef.value?.focus()
  1117. })
  1118. }
  1119. //失去焦点
  1120. const specialPos = ref({ start: 0, end: 0 })
  1121. const specialInputBlur = (e) => {
  1122. specialPos.value = {
  1123. start: e?.target?.selectionStart || 0,
  1124. end: e?.target?.selectionEnd || 0,
  1125. }
  1126. }
  1127. //点击符号
  1128. const specialClick = (event) => {
  1129. const text = event?.target?.innerText ?? ''
  1130. const start = specialPos.value.start
  1131. const end = specialPos.value.end
  1132. const form = specialFormModel.value.val
  1133. specialFormModel.value.val = setPosInsert(start, end, form, text)
  1134. specialRef.value?.focus()
  1135. let posVal = start + text.length
  1136. nextTick(() => {
  1137. setPosRange('specialId', posVal)
  1138. })
  1139. }
  1140. //确认插入
  1141. const specialNodeClick = async () => {
  1142. const res = await formValidate(specialFormRef.value)
  1143. if (res) {
  1144. const item = tableFormItemNode.value
  1145. const form = formData.value[item.index]
  1146. const val = specialFormModel.value.val ?? ''
  1147. formData.value[item.index][item.KeyName] = setPosInsert(item.startPos, item.endPos, form[item.KeyName], val)
  1148. specialModal.value = false
  1149. specialRef.value?.focus()
  1150. let posVal = item.startPos + val.length
  1151. nextTick(() => {
  1152. setPosRange(item.KeyName, posVal)
  1153. })
  1154. }
  1155. }
  1156. //关联试验数据
  1157. const CTDModal = ref(false)
  1158. //树形结构异步加载数据
  1159. const defaultExpandedCids = ref([])
  1160. //自动展开缓存
  1161. const CTDTreeAutoExpandKeys = ref(getStoreValue('CTDElTreeExpandKeys') || [])
  1162. const dialogTableRef = ref(null)
  1163. const dialogTableRef1 = ref(null)
  1164. const dialogTableRef2 = ref(null)
  1165. const ElTreeProps = ref({
  1166. label: 'title',
  1167. children: 'children',
  1168. isLeaf: 'hasChildren',
  1169. })
  1170. const ElTreeLoadNode = async (node, resolve) => {
  1171. let parentId = '0'
  1172. if (node.level !== 0) {
  1173. parentId = node?.data?.id
  1174. }
  1175. //获取数据
  1176. const { error, code, data } = await samplingApi.queryLazyTree({
  1177. wbsId: wbsTempId.value,
  1178. tenantId: tenantId.value,
  1179. projectId: projectId.value,
  1180. parentId,
  1181. wbsType: wbsType.value,
  1182. })
  1183. //处理数据
  1184. if (!error && code === 200) {
  1185. let clickKey = '', defaultExpandedArr = []
  1186. const keys = CTDTreeAutoExpandKeys.value || []
  1187. const resData = getArrValue(data)
  1188. for (let i = 0; i < resData.length; i++) {
  1189. resData[i].hasChildren = !resData[i].hasChildren
  1190. }
  1191. if (keys.length > 0) {
  1192. let lastKey = keys[keys.length - 1]
  1193. for (const item of resData) {
  1194. //自动展开
  1195. if (isItem(keys, item?.primaryKeyId)) {
  1196. defaultExpandedArr.push(item?.primaryKeyId)
  1197. }
  1198. //最后一个,选中点击
  1199. if (item?.primaryKeyId === lastKey) {
  1200. clickKey = item?.primaryKeyId
  1201. }
  1202. }
  1203. } else if (node.level === 0) {
  1204. defaultExpandedArr.push(resData[0]?.primaryKeyId)
  1205. }
  1206. //自动展开
  1207. defaultExpandedCids.value = defaultExpandedArr
  1208. if (node.level === 0) {
  1209. emit('nodeLoading')
  1210. if (resData.length <= 0) {
  1211. window?.$message?.warning('该项目未使用试验系统,无法获取数据')
  1212. }
  1213. }
  1214. resolve(resData)
  1215. //最后一个,执行点击
  1216. if (clickKey) {
  1217. await nextTick(() => {
  1218. // document.getElementById(`${idPrefix.value}${clickKey}`)?.click()
  1219. })
  1220. }
  1221. } else {
  1222. if (node.level === 0) {
  1223. emit('nodeLoading')
  1224. }
  1225. resolve([])
  1226. }
  1227. }
  1228. //节点被点击
  1229. const CTDnodeItemInfo = ref({})
  1230. const CTDnodeDataInfo = ref({})
  1231. const CTDdialogTableData1 = ref([])
  1232. const filedialogTableData = ref([])
  1233. //多选
  1234. const filetableCheckedKeys = ref([])
  1235. const filedialogTableSelection1 = (rows) => {
  1236. filetableCheckedKeys.value = rows.filter((item) => {
  1237. return (item ?? '') !== ''
  1238. })
  1239. }
  1240. const filedialogTableSelection = (rows) => {
  1241. filetableCheckedKeys.value = rows.filter((item) => {
  1242. return (item ?? '') !== ''
  1243. })
  1244. }
  1245. //确认关联试验文件
  1246. const savefileModal = () => {
  1247. const idarr = []
  1248. filetableCheckedKeys.value.forEach((item) => {
  1249. idarr.push(item.id)
  1250. })
  1251. const idval = idarr.join(',')
  1252. if (idval.length > 0) {
  1253. savesubmitRelationFile(idval)
  1254. fileModal.value = false
  1255. } else {
  1256. window?.$message?.warning('请选择你要关联的文件')
  1257. }
  1258. }
  1259. const CTDdialogTableColumn = ref([
  1260. { key: 'recordNo', name: '报告编号' },
  1261. { key: 'reportDate', name: '报告日期' },
  1262. { key: 'projectPositionName', name: '工程用途及部位' },
  1263. { key: 'detectionResultName', name: '检测结果' },
  1264. ])
  1265. const filedialogTableColumn = ref([
  1266. // reportNo
  1267. { key: 'recordNo', name: '报告编号' },
  1268. { key: 'reportDate', name: '报告日期' },
  1269. { key: 'projectPositionName', name: '工程用途及部位' },
  1270. { key: 'detectionResultName', name: '检测结果' },
  1271. ])
  1272. const filedialogTableColumn1 = ref([
  1273. // reportNo
  1274. { key: 'reportNo', name: '报告编号' },
  1275. { key: 'reportDate', name: '报告日期' },
  1276. { key: 'projectPositionName', name: '工程用途及部位' },
  1277. { key: 'detectionResultName', name: '检测结果' },
  1278. ])
  1279. const CTDElTreeClick = (data, node, keys) => {
  1280. CTDnodeItemInfo.value = node
  1281. CTDnodeDataInfo.value = data
  1282. getNodeData()
  1283. //缓存展开的节点
  1284. CTDTreeAutoExpandKeys.value = keys.value || []
  1285. setStoreValue('CTDElTreeExpandKeys', keys.value)
  1286. }
  1287. //获取试验树节点下的记录信息
  1288. const getNodeData = async () => {
  1289. //获取数据
  1290. CTDdialogTableLoading.value = true
  1291. const { error, code, data } = await samplingApi.gettrialPage({
  1292. contractId: contractId.value,
  1293. nodeId: CTDnodeDataInfo.value.primaryKeyId,
  1294. current: CTDsearchFormPage.value.current,
  1295. size: CTDsearchFormPage.value.size,
  1296. startTime: CTDsearchFormPage.value.startTime,
  1297. endTime: CTDsearchFormPage.value.lastTime,
  1298. })
  1299. //处理数据
  1300. if (!error && code === 200) {
  1301. CTDdialogTableData1.value = getArrValue(data['records'])
  1302. CTDsearchFormPage.value.total = data.total || 0
  1303. CTDdialogTableLoading.value = false
  1304. } else {
  1305. CTDdialogTableData1.value = []
  1306. CTDsearchFormPage.value.total = 0
  1307. CTDdialogTableLoading.value = false
  1308. }
  1309. }
  1310. //试验文件节点下的数据
  1311. const getfileNodeData = async () => {
  1312. //获取数据
  1313. filedialogTableLoading.value = true
  1314. const { error, code, data } = await samplingApi.gettrialPage({
  1315. contractId: contractId.value,
  1316. nodeId: filenodeDataInfo.value.primaryKeyId,
  1317. current: filesearchFormPage.value.current,
  1318. size: filesearchFormPage.value.size,
  1319. startTime: filesearchFormPage.value.startTime,
  1320. endTime: filesearchFormPage.value.lastTime,
  1321. qualityTestPKeyId: isPrimaryKeyId.value,
  1322. })
  1323. //处理数据
  1324. if (!error && code === 200) {
  1325. filedialogTableData.value = getArrValue(data['records'])
  1326. filesearchFormPage.value.total = data.total || 0
  1327. filedialogTableLoading.value = false
  1328. let defaultarr = []
  1329. filedialogTableData.value.forEach((item) => {
  1330. if (item.isSelectedStatus === 1) {
  1331. defaultarr.push(item)
  1332. }
  1333. tabtoggleSelection(defaultarr)
  1334. })
  1335. } else {
  1336. filedialogTableData.value = []
  1337. filesearchFormPage.value.total = 0
  1338. filesearchFormPage.value = false
  1339. }
  1340. }
  1341. const tabtoggleSelection = (rows) => {
  1342. if (rows) {
  1343. rows.forEach(row => {
  1344. nextTick(() => {
  1345. dialogTableRef1.value?.toggleRowSelection(row, true)
  1346. })
  1347. })
  1348. } else {
  1349. dialogTableRef1.value?.clearSelection()
  1350. }
  1351. }
  1352. const outtabtoggleSelection = (rows) => {
  1353. if (rows) {
  1354. rows.forEach(row => {
  1355. nextTick(() => {
  1356. dialogTableRef2.value?.toggleRowSelection(row, true)
  1357. })
  1358. })
  1359. } else {
  1360. dialogTableRef2.value?.clearSelection()
  1361. }
  1362. }
  1363. const thirdtabtoggleSelection = (rows) => {
  1364. console.log(rows, 'rows')
  1365. if (rows) {
  1366. rows.forEach(row => {
  1367. nextTick(() => {
  1368. if (fileModalradio.value == 2) {
  1369. dialogTableRef2.value?.toggleRowSelection(row, true)
  1370. } else {
  1371. dialogTableRef.value?.toggleRowSelection(row, true)
  1372. }
  1373. })
  1374. })
  1375. } else {
  1376. if (fileModalradio.value == 2) {
  1377. dialogTableRef2.value?.clearSelection()
  1378. } else {
  1379. dialogTableRef.value?.clearSelection()
  1380. }
  1381. }
  1382. }
  1383. //获取试验表中的data数据接口:
  1384. const getBussddataInfotrialData = async () => {
  1385. insertDataTableLoading.value = true
  1386. const { error, code, data } = await dataApi.getBussddataInfotrial({
  1387. id: testReportId.value,
  1388. pkeyId: checPkd.value[0]['pKeyId'],
  1389. })
  1390. insertDataTableLoading.value = false
  1391. if (!error && code === 200) {
  1392. insertDataTable.value = getArrValue(data)
  1393. } else {
  1394. insertDataTable.value = []
  1395. }
  1396. }
  1397. //保存试验节点数据
  1398. //取消关联数据
  1399. const cancelinsertData = async () => {
  1400. insertDataShow.value = false
  1401. }
  1402. //确定关联试验数据数据
  1403. const submitinsertData = async () => {
  1404. if (multipleSelection.value.length > 0) {
  1405. const item = tableFormItemNode.value
  1406. const form = formData.value[item.index]
  1407. const val = []
  1408. multipleSelection.value.forEach((item) => {
  1409. val.push(item['key_12__3_1'])
  1410. })
  1411. const newval = val.join('、')
  1412. formData.value[item.index][item.KeyName] = setPosInsert(item.startPos, item.endPos, form[item.KeyName], newval)
  1413. insertDataShow.value = false
  1414. CTDModal.value = false
  1415. let posVal = item.startPos + newval.length
  1416. nextTick(() => {
  1417. setPosRange(item.KeyName, posVal)
  1418. })
  1419. } else {
  1420. window?.$message?.warning('请选择你要关联的数据')
  1421. }
  1422. }
  1423. //节点被点击
  1424. const ElTreeClick = async (data, node) => {
  1425. console.log(data, mode)
  1426. let autoKeysArr = []
  1427. await getNodeExpandKeys(node, autoKeysArr)
  1428. const autoKeys = autoKeysArr.reverse()
  1429. emit('nodeTap', { node, data, keys: autoKeys })
  1430. }
  1431. //处理自动展开的节点KEY
  1432. const getNodeExpandKeys = async (node, newKeys) => {
  1433. const parent = node?.parent ?? []
  1434. const primaryKeyId = node?.data?.primaryKeyId ?? ''
  1435. if (primaryKeyId) {
  1436. newKeys.push(primaryKeyId)
  1437. await getNodeExpandKeys(parent, newKeys)
  1438. }
  1439. }
  1440. const CTDbetweenTime = ref([])
  1441. const filebetweenTime = ref([])
  1442. //搜索表单
  1443. const CTDsearchFormPage = ref({
  1444. startTime: null, lastTime: null, wbsId: null, current: 1, size: 20, total: 0,
  1445. })
  1446. const filesearchFormPage = ref({
  1447. startTime: null, lastTime: null, wbsId: null, current: 1, size: 20, total: 0,
  1448. })
  1449. const CTDsearchFormPageChange = ({ current, size }) => {
  1450. CTDsearchFormPage.value.current = current
  1451. CTDsearchFormPage.value.size = size
  1452. // getDialogTableData()
  1453. }
  1454. const filesearchFormPageChange = ({ current, size }) => {
  1455. filesearchFormPage.value.current = current
  1456. filesearchFormPage.value.size = size
  1457. // getDialogTableData()
  1458. }
  1459. const CTDbetweenTimeUpdate = ({ arr, query }) => {
  1460. CTDbetweenTime.value = arr
  1461. CTDsearchFormPage.value.startTime = arr[0]
  1462. CTDsearchFormPage.value.lastTime = arr[1]
  1463. }
  1464. const filebetweenTimeUpdate = ({ arr, query }) => {
  1465. filebetweenTime.value = arr
  1466. filesearchFormPage.value.startTime = arr[0]
  1467. filesearchFormPage.value.lastTime = arr[1]
  1468. }
  1469. //搜索
  1470. const CTDsearchClick = () => {
  1471. CTDsearchFormPage.value.current = 1
  1472. getNodeData()
  1473. }
  1474. const filesearchClick = () => {
  1475. filesearchFormPage.value.current = 1
  1476. getfileNodeData()
  1477. }
  1478. const CTDdialogTableLoading = ref(false)
  1479. const filedialogTableLoading = ref(false)
  1480. const insertDataSelectoading = ref(false)
  1481. const CTDdialogTableKeys = ref([])
  1482. let currowid = ref('')
  1483. //名称被点击
  1484. const CTDtableRowName = (row) => {
  1485. currowid.value = row.id
  1486. insertDataShow.value = true
  1487. getSearchNodeTables()
  1488. }
  1489. const getSearchNodeTables = async () => {
  1490. insertDataSelectoading.value = true
  1491. const { error, code, data } = await dataApi.searchNodeTables({
  1492. id: currowid,
  1493. projectId: projectId.value,
  1494. contractId: contractId.value,
  1495. primaryKeyId: CTDnodeDataInfo.value.primaryKeyId,
  1496. type: authBtnTabKey.value,
  1497. tableType: tabTypeKey.value,
  1498. })
  1499. //处理数据
  1500. insertDataSelectoading.value = false
  1501. if (!error && code === 200) {
  1502. testReportData.value = getArrValue(data)
  1503. } else {
  1504. testReportData.value = []
  1505. }
  1506. }
  1507. //关联试验文件
  1508. const fileModal = ref(false)
  1509. const fileModalradio = ref(1)
  1510. const radioChange = (val) => {
  1511. if (val !== 1) {
  1512. getthirdTreeDatas(val)
  1513. }
  1514. }
  1515. //获取试验文件树树数据
  1516. const fileModaltreeDatas = ref([])
  1517. //节点被点击
  1518. //节点被点击
  1519. const filenodeItemInfo = ref({})
  1520. const filenodeDataInfo = ref({})
  1521. const fileTableData1 = ref([])
  1522. const fileTableColumn = ref([
  1523. { key: 'recordNo', name: '报告编号' },
  1524. { key: 'reportDate', name: '报告日期' },
  1525. { key: 'projectPositionName', name: '工程用途及部位' },
  1526. { key: 'detectionResultName', name: '检测结果' },
  1527. ])
  1528. const fileModalElTreeClick = async (data, node) => {
  1529. filenodeItemInfo.value = node
  1530. filenodeDataInfo.value = data
  1531. getfileNodeData()
  1532. }
  1533. //获取第三方树试验文件
  1534. //获取树数据
  1535. const thirdtreeDatas = ref([])
  1536. const thirdElTreeProps = ref({
  1537. label: 'nodeName',
  1538. children: 'children',
  1539. isLeaf: 'hasChildren',
  1540. })
  1541. const getthirdTreeDatas = async (type) => {
  1542. const { error, code, data } = await getTreeAll({
  1543. projectId: projectId.value,
  1544. contractId: contractId.value,
  1545. })
  1546. if (!error && code === 200) {
  1547. if (type == 2) {
  1548. thirdtreeDatas.value = getArrValue(data['rightTree'])
  1549. } else {
  1550. thirdtreeDatas.value = getArrValue(data['leftTree'])
  1551. }
  1552. } else {
  1553. thirdtreeDatas.value = []
  1554. }
  1555. }
  1556. const thirdfilenodeItemInfo = ref({})
  1557. const thirdfilenodeDataInfo = ref({})
  1558. //获取第三方树节点下的数据
  1559. const getthirdTreetavleDatas = async () => {
  1560. filedialogTableLoading.value = true
  1561. const { error, code, data } = await thirdApi.queryPage({
  1562. projectId: projectId.value,
  1563. contractId: contractId.value,
  1564. nodeId: thirdfilenodeDataInfo.value.id,
  1565. current: filesearchFormPage.value.current,
  1566. size: filesearchFormPage.value.size,
  1567. startTime: filesearchFormPage.value.startTime,
  1568. endTime: filesearchFormPage.value.lastTime,
  1569. qualityTestPKeyId: isPrimaryKeyId.value,
  1570. })
  1571. //处理数据
  1572. if (!error && code === 200) {
  1573. filedialogTableData.value = getArrValue(data['records'])
  1574. filesearchFormPage.value.total = data.total || 0
  1575. filedialogTableLoading.value = false
  1576. if (filedialogTableData.value.length > 0) {
  1577. let defaultarr = []
  1578. filedialogTableData.value.forEach((item) => {
  1579. if (item.isSelectedStatus === 1) {
  1580. defaultarr.push(item)
  1581. }
  1582. if (fileModalradio.value === 2) {
  1583. outtabtoggleSelection(defaultarr)
  1584. } else {
  1585. thirdtabtoggleSelection(defaultarr)
  1586. }
  1587. })
  1588. }
  1589. } else {
  1590. filedialogTableData.value = []
  1591. filesearchFormPage.value.total = 0
  1592. filesearchFormPage.value = false
  1593. }
  1594. filedialogTableLoading.value = false
  1595. }
  1596. const thirdtreeDatasElTreeClick = (data, node) => {
  1597. thirdfilenodeItemInfo.value = node
  1598. thirdfilenodeDataInfo.value = data
  1599. getthirdTreetavleDatas()
  1600. }
  1601. //关联试验文件
  1602. const savesubmitRelationFile = async (ids) => {
  1603. console.log(isPrimaryKeyId.value, ' isPrimaryKeyId.value')
  1604. const { error, code, data } = await samplingApi.submitRelationFile({
  1605. projectId: projectId.value,
  1606. contractId: contractId.value,
  1607. nodeId: isPrimaryKeyId.value,
  1608. type: fileModalradio.value,
  1609. ids,
  1610. })
  1611. if (!error && code === 200) {
  1612. window?.$message?.success('操作成功')
  1613. }
  1614. }
  1615. //设计值频率计算
  1616. const IDVFModalSaveClick = async () => {
  1617. const { pkeyId, KeyName, index } = tableFormItemNode.value
  1618. if (pkeyId) {
  1619. const { design, size } = formIDVFModel.value
  1620. const { error, code, data } = await wbsApi.queryFormulaRange({
  1621. ...formIDVFModel.value,
  1622. // dev: (!design && !size) ? '±5': '',
  1623. key: KeyName,
  1624. pkId: pkeyId,
  1625. })
  1626. //处理数据
  1627. const res = getObjVal(data)
  1628. if (!error && code === 200 && res) {
  1629. Object.keys(data).forEach(key => {
  1630. formData.value[index][key] = data[key]
  1631. })
  1632. IDVFModal.value = false
  1633. }
  1634. } else {
  1635. window?.$message?.warning('pkeyId为空')
  1636. }
  1637. }
  1638. const closeIDVFModal = () => {
  1639. IDVFModal.value = false
  1640. formIDVFModel.value = { type: 1, design: '', size: '', dev: '', key: '', capacity: '', pass: '', pkId: '' }
  1641. }
  1642. //被点击
  1643. const getOffsetTop = (key = '') => {
  1644. if (key) {
  1645. const dom = document.getElementById(key[key.length - 1])
  1646. if (!drawType.value) {
  1647. if (dom.offsetTop >= 583 && ActiveKey.value.length > 1) {
  1648. emit('offsetTop', dom.offsetTop - 583)
  1649. } else {
  1650. emit('offsetTop', dom.offsetTop)
  1651. }
  1652. } else {
  1653. if (dom.offsetTop >= 424 && ActiveKey.value.length > 1) {
  1654. emit('offsetTop', dom.offsetTop - 424)
  1655. } else {
  1656. emit('offsetTop', dom.offsetTop)
  1657. }
  1658. }
  1659. } else {
  1660. emit('offsetTop', 0)
  1661. }
  1662. ActiveKey.value = ActiveKey.value[ActiveKey.value.length - 1]
  1663. }
  1664. //通知数据更新
  1665. const renewData = () => {
  1666. emit('renew')
  1667. ActiveKey.value = []
  1668. }
  1669. //获取表单数据
  1670. const getFormData = () => {
  1671. const formArr = formData.value
  1672. return formArr.filter((item) => {
  1673. return (item.pkeyId ?? '') !== '' && item.isCollapseLoad
  1674. })
  1675. }
  1676. //获取表单效验数据
  1677. const getFormRegExpJson = () => {
  1678. return deepClone(formRegExpJson.value)
  1679. }
  1680. //获取当前展开项
  1681. const getActiveKey = () => {
  1682. return ActiveKey.value
  1683. }
  1684. //设置当前展开项
  1685. const setActiveKey = (key) => {
  1686. return ActiveKey.value = key
  1687. }
  1688. //名称被点击
  1689. const tableRowName = (row) => {
  1690. console.log(row, 'row')
  1691. //如果 evisaPdfUrl 不为空,使用evisaPdfUrl,反之使用pdfUrl
  1692. // if (row['evisaPdfUrl']) {
  1693. // window.open(row['evisaPdfUrl'],'_blank')
  1694. // } else if (row['pdfUrl']) {
  1695. // window.open(row['pdfUrl'],'_blank')
  1696. // } else {
  1697. // window.$message?.warning('文件不存在')
  1698. // }
  1699. }
  1700. // 暴露出去
  1701. defineExpose({
  1702. getFormData,
  1703. getFormRegExpJson,
  1704. getActiveKey,
  1705. setActiveKey,
  1706. })
  1707. </script>
  1708. <style lang="scss" scoped>
  1709. table {
  1710. width: 100%;
  1711. }
  1712. .data-fill-list-box {
  1713. position: relative;
  1714. //margin-bottom: 25%;
  1715. .hc-collapse-item-header {
  1716. flex: 1;
  1717. position: relative;
  1718. margin-left: 46px;
  1719. display: flex;
  1720. align-items: center;
  1721. .item-title {
  1722. flex: 1;
  1723. position: relative;
  1724. user-select: none;
  1725. color: #50545E;
  1726. font-size: 16px;
  1727. font-weight: 400;
  1728. cursor: pointer;
  1729. }
  1730. .hc-extra-text-box {
  1731. position: relative;
  1732. padding-right: 24px;
  1733. }
  1734. }
  1735. .data-fill-list-item-content {
  1736. position: relative;
  1737. display: flex;
  1738. height: calc(100vh - 386px);
  1739. .data-fill-table-form-box {
  1740. position: relative;
  1741. padding: 24px 20px;
  1742. height: 100%;
  1743. overflow: auto;
  1744. flex: 1;
  1745. border: 8px solid #50545E;
  1746. .hc-no-table-form {
  1747. position: relative;
  1748. height: 100%;
  1749. display: flex;
  1750. justify-content: center;
  1751. align-items: center;
  1752. .table-form-no {
  1753. position: relative;
  1754. img {
  1755. width: 350px;
  1756. }
  1757. .desc {
  1758. text-align: center;
  1759. font-size: 20px;
  1760. color: #aaa;
  1761. }
  1762. }
  1763. }
  1764. }
  1765. .data-fill-table-tip-box {
  1766. width: 240px;
  1767. position: relative;
  1768. border-left: 1px solid #E9E9E9;
  1769. padding: 20px 15px 80px;
  1770. .tip-title {
  1771. font-size: 16px;
  1772. margin-bottom: 10px;
  1773. display: flex;
  1774. align-items: center;
  1775. }
  1776. .tip-item {
  1777. margin-bottom: 20px;
  1778. }
  1779. .table-tip-foot {
  1780. position: absolute;
  1781. bottom: 15px;
  1782. right: 0;
  1783. left: 0;
  1784. display: flex;
  1785. align-items: center;
  1786. padding: 0 15px;
  1787. .tip-left-btn {
  1788. flex: 1;
  1789. .dow-text {
  1790. cursor: pointer;
  1791. display: flex;
  1792. align-items: center;
  1793. }
  1794. }
  1795. }
  1796. }
  1797. }
  1798. }
  1799. .special-box {
  1800. position: relative;
  1801. display: flex;
  1802. justify-content: center;
  1803. align-items: center;
  1804. border: 1px solid #eee;
  1805. border-radius: 3px;
  1806. height: 52px;
  1807. width: 52px;
  1808. cursor: pointer;
  1809. user-select: none;
  1810. transition: color .3s, background-color .3s;
  1811. &:hover {
  1812. color: var(--el-color-primary);
  1813. background-color: var(--el-color-primary-light-8);
  1814. }
  1815. .font-EUDC {
  1816. font-size: 22px;
  1817. }
  1818. }
  1819. .radio-group-box {
  1820. text-align: center;
  1821. }
  1822. </style>
  1823. <style lang="scss">
  1824. .data-fill-list-box {
  1825. .el-collapse {
  1826. --el-collapse-header-height: 60px;
  1827. border: 0;
  1828. .el-collapse-item {
  1829. margin: 0 0 16px;
  1830. background-color: #f1f5f8;
  1831. border: 1px solid #E9E9E9;
  1832. border-radius: 4px;
  1833. }
  1834. .el-collapse-item__header {
  1835. background-color: transparent;
  1836. font-weight: 400;
  1837. border-bottom: 0;
  1838. cursor: default;
  1839. font-size: 14px;
  1840. .el-collapse-item__arrow {
  1841. position: absolute;
  1842. color: #50545E;
  1843. cursor: pointer;
  1844. left: 20px;
  1845. margin: 0;
  1846. }
  1847. }
  1848. .el-collapse-item.is-active .el-collapse-item__header.is-active {
  1849. background-color: #E7EEF4;
  1850. }
  1851. .el-collapse-item__wrap {
  1852. background-color: transparent;
  1853. border-bottom: 0;
  1854. .el-collapse-item__content {
  1855. position: relative;
  1856. padding-bottom: 0;
  1857. font-size: 14px;
  1858. color: #50545E;
  1859. line-height: initial;
  1860. }
  1861. }
  1862. }
  1863. }
  1864. //插入特殊字符弹窗的输入框
  1865. .data-fill-list-box .data-fill-table-form-box td,
  1866. .data-fill-list-box .data-fill-table-form-box td .el-input .el-input__wrapper .el-input__inner,
  1867. .el-form-item.special-form-item .el-form-item__content .el-input .el-input__wrapper .el-input__inner {
  1868. font-family: "hc-eudc", hc-sans, 宋体, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  1869. }
  1870. //复制本表弹窗
  1871. .copy-node-many-box {
  1872. position: relative;
  1873. height: 53vh;
  1874. display: flex;
  1875. margin-top: 24px;
  1876. margin-bottom: -30px;
  1877. border-top: 1px solid #efeff5;
  1878. .copy-node-many-tree {
  1879. position: relative;
  1880. flex: 1;
  1881. height: 100%;
  1882. padding: 20px 20px 20px 0;
  1883. border-right: 1px solid #efeff5;
  1884. }
  1885. .copy-node-many-table {
  1886. position: relative;
  1887. flex: 1;
  1888. height: 100%;
  1889. padding: 20px 0 20px 20px;
  1890. }
  1891. }
  1892. //关联试验数据
  1893. .adding-form-dialog-box {
  1894. position: relative;
  1895. height: 100%;
  1896. display: flex;
  1897. .dialog-tree-box {
  1898. position: relative;
  1899. border-right: 1px solid #EEEEEE;
  1900. width: 500px;
  1901. height: 100%
  1902. }
  1903. .dialog-table-box {
  1904. position: relative;
  1905. flex: 1;
  1906. height: 100%;
  1907. padding: 18px;
  1908. .dialog-search {
  1909. position: relative;
  1910. display: flex;
  1911. }
  1912. .dialog-table {
  1913. position: relative;
  1914. height: calc(100% - 68px);
  1915. padding: 18px 0;
  1916. }
  1917. .dialog-pages {
  1918. position: relative;
  1919. }
  1920. }
  1921. }
  1922. .copy-node-many-table {
  1923. position: relative;
  1924. flex: 1;
  1925. height: 100%;
  1926. padding: 20px 0 20px 20px;
  1927. }
  1928. .dialog-table-box {
  1929. position: relative;
  1930. flex: 1;
  1931. height: 100%;
  1932. padding: 18px;
  1933. .dialog-search {
  1934. position: relative;
  1935. display: flex;
  1936. }
  1937. .dialog-table {
  1938. position: relative;
  1939. height: calc(100% - 68px);
  1940. padding: 18px 0;
  1941. }
  1942. .dialog-pages {
  1943. position: relative;
  1944. }
  1945. }
  1946. .text-blue {
  1947. color: blue;
  1948. }
  1949. .text-green {
  1950. color: green
  1951. }
  1952. </style>