ListItem.vue 68 KB

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