ListItem.vue 69 KB

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