ListItem.vue 68 KB

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