test-form.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257
  1. <template>
  2. <div class="hc-page-box">
  3. <HcCard actionUi="text-center">
  4. <template #header>
  5. <el-button :type="authBtnTabKey === '1'?'primary':''" hc-btn @click="authBtnTabClick('1')">
  6. <HcIcon name="folder-user"/>
  7. <span>施工自检</span>
  8. </el-button>
  9. <el-button :type="authBtnTabKey === '2'?'primary':''" hc-btn @click="authBtnTabClick('2')">
  10. <HcIcon name="folder-shield"/>
  11. <span>监理质检</span>
  12. </el-button>
  13. </template>
  14. <template #extra>
  15. <el-button type="primary" hc-btn @click="linksRelateModalClick" :disabled="listItemData.length <= 0">关联工程用途及部位</el-button>
  16. <el-button :type="isMixRatioTestIds ? 'primary' : ''" hc-btn :disabled="!isMixRatioTestIds" @click="linksRawModalClick">关联原材检测报告</el-button>
  17. <el-button type="primary" hc-btn @click="linksSampleModalClick" >关联取样</el-button>
  18. </template>
  19. <template #search>
  20. <div class="flex-1">
  21. <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange" size="default" :round="false"/>
  22. </div>
  23. <div class="hc-search-top-form">
  24. <div class="w-40">
  25. <el-input v-model="listItemBaseData.trialUserName" placeholder="请输入试验人员" clearable/>
  26. </div>
  27. <div class="w-36 ml-2" v-if="tabTypeKey === '2'">
  28. <el-date-picker type="date" v-model="listItemBaseData.reportDate" class="block" value-format="YYYY-MM-DD" :clearable="false" placeholder="请选择报告日期"/>
  29. </div>
  30. <div class="w-28 ml-2" v-if="tabTypeKey === '2'">
  31. <el-select v-model="listItemBaseData.detectionResult" placeholder="是否合格" block>
  32. <el-option label="合格" value="1" />
  33. <el-option label="不合格" value="0" />
  34. </el-select>
  35. </div>
  36. <div class="w-36 ml-2">
  37. <el-select v-model="listItemBaseData.detectionCategory" placeholder="选择检测类型" block>
  38. <el-option v-for="item in categoryData" :label="item['dictValue']" :value="item['dictKey']"/>
  39. </el-select>
  40. </div>
  41. </div>
  42. </template>
  43. <!--清表列表-->
  44. <el-scrollbar ref="ListItemScrollRef" v-loading="isLoading" v-if="listItemData.length > 0">
  45. <ListItem ref="ListItemRef" :datas="listItemData" :status="1" :baseData="listItemBaseData" @offsetTop="ListItemOffsetTop" @renew="getTableDataAll"
  46. :deviceUseIds="listDeviceUseIds"
  47. :authBtnTabKey="authBtnTabKey"
  48. :tabTypeKey="tabTypeKey"
  49. @updeviceUseIds="updeviceUseIds"
  50. @upcheckTableId="upcheckTableId"
  51. @changeIscanclick="changeIscanclick"
  52. :nodeIdvalue="nodeIdvalue"
  53. :alllistData="alllistData"
  54. @changesdate="changeorinsdate"
  55. @chageorinData="chageorinData"
  56. :NodeStatus="NodeStatus"
  57. />
  58. </el-scrollbar>
  59. <template #action>
  60. <div class="hc-table-form-action-tip">
  61. <el-alert title="完善资料填写后记得一定要保存哦"
  62. show-icon
  63. type="warning"
  64. :closable="false"
  65. class="hc-alert"
  66. style=""/>
  67. </div>
  68. <el-button type="primary" hc-btn :disabled="NodeStatus === '3' || listItemData.length <= 0" :loading="tableFormSaveLoading" @click="tableFormSaveClick">
  69. <HcIcon name="save"/>
  70. <span>保存</span>
  71. </el-button>
  72. <el-button hc-btn :loading="reportLoading" @click="reportModalClick" :disabled="NodeStatus === '3' || NodeStatus === '1'" >
  73. <HcIcon name="send-plane-2"/>
  74. <span>上报</span>
  75. </el-button>
  76. <!-- <el-button hc-btn :loading="reportLoading" @click="reportModalClick" >
  77. <HcIcon name="send-plane-2"/>
  78. <span>上报</span>
  79. </el-button> -->
  80. <el-button hc-btn :disabled="NodeStatus === '1'" :loading="bussPdfsLoading" @click="bussPdfsClick(router.currentRoute.value.query.id||nodeIdvalue)">
  81. <HcIcon name="eye"/>
  82. <span>预览</span>
  83. </el-button>
  84. <el-button hc-btn @click="abolishOneClick" v-if="NodeStatus === '3'">
  85. <HcIcon name="arrow-go-back"/>
  86. <span>撤回上报流程</span>
  87. </el-button>
  88. <el-button hc-btn @click="toBackClick">
  89. <HcIcon name="delete-back"/>
  90. <span>返回</span>
  91. </el-button>
  92. </template>
  93. </HcCard>
  94. <!--关联工程用途及部位-->
  95. <HcDialog :show="linksRelateModal" title="关联工程用途及部位" widths="50rem" isTable saveText="确认关联" @close="linksRelateModalClose" @save="linksRelateModalSave">
  96. <div class="hc-links-relate-tree-box">
  97. <div class="hc-search-tree-val">
  98. <el-input v-model="linksRelateSearchTreeVal" block size="large" placeholder="请输入名称关键词检索" clearable @keyup="searchTreeKeyUp">
  99. <template #suffix>
  100. <HcIcon name="search-2" ui="text-xl" @click="searchTreeClick"/>
  101. </template>
  102. </el-input>
  103. </div>
  104. <div class="hc-tree-scrollbar" v-loading="linksRelateTreeLoading" element-loading-text="获取数据中...">
  105. <el-scrollbar>
  106. <!-- <DivisionTree :datas="unmatchedTreeData" @nodeTap="divisionTreeClick" @nodeCheck="divisionTreeCheck" :defaultCheckarr="defaultCheckarrIds"/> -->
  107. <DivisionTree1
  108. v-show="isSearchTree"
  109. :datas="searchTreeData"
  110. @nodeTap="divisionTreeClick"
  111. @nodeCheck="divisionTreeCheck"
  112. :defaultCheckarr="defaultCheckarrIds"
  113. :ElTreeProps="seaElTreeProps"
  114. :defaultExpandAll="true"
  115. :divisionLoading="searchlinksRelateTreeLoading"/>
  116. <DivisionTree
  117. ref="divisionTree"
  118. v-show="!isSearchTree"
  119. :datas="unmatchedTreeData"
  120. @nodeTap="divisionTreeClick"
  121. @nodeCheck="divisionTreeCheck"
  122. :defaultCheckarr="defaultCheckarrIds"
  123. :divisionLoading="isdivisionLoading"
  124. :linksRelateSearchTreeVal="linksRelateSearchTreeVal"
  125. />
  126. </el-scrollbar>
  127. </div>
  128. </div>
  129. </HcDialog>
  130. <!--关联原材检测报告-->
  131. <HcDialog :show="linksRawModal" title="关联原材检测报告" widths="75rem" isTable saveText="确认关联" @close="linksRawModalClose" @save="linksRawModalSave">
  132. <div class="hc-links-sample-modal-box">
  133. <div class="hc-links-sample-tree-box">
  134. <el-scrollbar>
  135. <test-tree-material :projectId="projectId" :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial" :wbsType="2" :tenantId="userInfo?.tenant_id" @nodeTap="linksRawTreeClick" :fromType="true" :nodeId="nodeId"
  136. :MixRatioTestTreeData="MixRatioTestTreeData"
  137. />
  138. </el-scrollbar>
  139. </div>
  140. <div class="hc-links-sample-table-box">
  141. <HcTable ref="tableRawRef" :column="linksRawTableColumn" :datas="linksRawTableData" :loading="linksRawTableLoading" :isIndex="false" isCheck @selection-change="linksRawTableSelection"/>
  142. </div>
  143. </div>
  144. </HcDialog>
  145. <!--关联取样-->
  146. <HcDialog :show="linksSampleModal" title="关联取样信息" widths="75rem" isTable saveText="确认" @close="linksSampleModalClose" @save="linksSampleModalSave">
  147. <div class="hc-links-sample-modal-box">
  148. <div class="hc-links-sample-tree-box">
  149. <el-scrollbar>
  150. <TestTree :projectId="projectId" :wbsTempId="projectInfo?.referenceWbsTemplateIdTrial" :wbsType="2" :tenantId="userInfo?.tenant_id" @nodeTap="linksSampleTreeClick" />
  151. </el-scrollbar>
  152. </div>
  153. <div class="hc-links-sample-table-box">
  154. <HcTable ref="tableSampleRef" :column="linksSampleTableColumn" :datas="linksSampleTableData" :loading="linksSampleTableLoading" :isIndex="false" isCheck @selection-change="linksSampleTableSelection"/>
  155. </div>
  156. </div>
  157. </HcDialog>
  158. <!--批量上报审批-->
  159. <HcReportModal title="批量上报审批" url="informationWriteQuery/taskOne" :show="showReportModal" :projectId="projectId" :contractId="contractId" type="wbs" :typeData="reportTypeData"
  160. :taskName="reportTaskName" :ids="reportIds" :addition="reportAddition" :trialSelfInspectionRecordId="dataId" @hide="showReportModal = false" @finish="showReportFinish"/>
  161. </div>
  162. </template>
  163. <script setup>
  164. import {ref, watch, onMounted,nextTick} from "vue";
  165. import {useAppStore} from "~src/store";
  166. import {useRouter, useRoute} from 'vue-router'
  167. import ListItem from "./components/ListItem.vue"
  168. import DivisionTree from "./components/DivisionTree.vue"
  169. import DivisionTree1 from "./components/DivisionTree1.vue"
  170. import dataApi from "~api/tentative/detect/test";
  171. import samplingApi from "~api/tentative/material/sampling"
  172. import divisionApi from "~api/data-fill/division";
  173. import queryApi from '~api/data-fill/query';
  174. import {getStoreData,setStoreData} from '~src/utils/storage'
  175. import TestTree from "../material/components/TestTree.vue"
  176. import TestTreeMaterial from "../material/components/TestTreeMaterial.vue"
  177. import {getArrValue, getObjValue, getObjNullValue,isString} from "vue-utils-plus";
  178. import {getDictionary} from "~api/other";
  179. import {rowsToId} from "~uti/tools";
  180. import dayjs from "dayjs"
  181. import { Loading } from "element-plus/es/components/loading/src/service";
  182. import { eVisaTaskCheckApi} from "~api/other"
  183. import wbsApi from "~api/data-fill/wbs"
  184. //变量
  185. const router = useRouter()
  186. const useRoutes = useRoute()
  187. const useAppState = useAppStore()
  188. const userInfo = ref(useAppState.getUserInfo);
  189. const projectId = ref(useAppState.getProjectId);
  190. const contractId = ref(useAppState.getContractId);
  191. const projectInfo = ref(useAppState.getProjectInfo);
  192. const contractInfo = ref(useAppState.getContractInfo);
  193. const divisionTree=ref(null)
  194. //获取模板标签数据
  195. const isTableForm = ref(false)
  196. //路由参数
  197. const routerQuery = useRoutes?.query;
  198. //存储目录格式 1按部位存储,2按日期存储
  199. const dataId = routerQuery?.id || '';
  200. const nodeId = routerQuery?.nodeId || '';
  201. const dataType = routerQuery?.dataType || '1';
  202. let isaddType = routerQuery?.isaddType || false;
  203. const afterAdd=ref(false)
  204. const dayDate = dayjs().format('YYYY-MM-DD')
  205. const testTreeItem = ref(getStoreData('testTreeItem'));
  206. const isMixRatioTestIds = ref(false);
  207. const tabTypeKey = ref('')
  208. const isopersampleIds=ref(false)
  209. //渲染完成
  210. onMounted(() => {
  211. tabTypeKey.value= routerQuery?.tabTypeKey || '1'
  212. const { title, mixRatioTestIds} = getObjValue(testTreeItem.value);
  213. const info = getStoreData('test-form') || {}
  214. console.log(info,'info');
  215. isMixRatioTestIds.value = !(!mixRatioTestIds || mixRatioTestIds <= 0);
  216. listItemBaseData.value.contractId = contractId.value
  217. listItemBaseData.value.trialProjectName = title
  218. listItemBaseData.value.reportDate = dayDate
  219. // listItemBaseData.value.detectionCategory = Number(dataType)
  220. listItemBaseData.value.detectionCategory = info.detectionCategory||1
  221. listItemBaseData.value.trialUserName =info.trialUserName||(userInfo.value['nick_name'])
  222. listItemBaseData.value.projectPosition = info.projectPosition||''
  223. listItemBaseData.value.rawMaterialIds = info.rawMaterialIds||''
  224. listItemBaseData.value.sampleIds = info.sampleIds||''
  225. if(info&&info.detectionResult){
  226. listItemBaseData.value.detectionResult=info.detectionResult.toString()
  227. }
  228. if(info&&info.projectPosition){
  229. defaultCheckarrIds.value=info.projectPosition.split(',')
  230. }
  231. getSearchNodeTables()
  232. getSearchNodeTablesall(1)
  233. getSearchNodeTablesall(2)
  234. getCategoryData()
  235. })
  236. //身份按钮切换数据
  237. const authBtnTabKey = ref(dataType)
  238. const authBtnTabClick = (val) => {
  239. if (val !== authBtnTabKey.value) {
  240. authBtnTabKey.value = val
  241. listItemBaseData.value.type = val
  242. listItemBaseData.value.detectionCategory = Number(val)
  243. getSearchNodeTables()
  244. }
  245. }
  246. //类型tab数据和相关处理
  247. const leftFormData=ref([])
  248. const rightFormData=ref([])
  249. const allFormData=ref([])
  250. const tabTypeTab = ref([
  251. {key:'1', name: '记录表'},
  252. {key:'2', name: '报告单'},
  253. ]);
  254. const tabTypeChange = ({key}) => {
  255. console.log(key,'切换key');
  256. // console.log(ListItemRef.value?.getFormData(),'ListItemRef.value?.getFormData()');
  257. tabTypeKey.value = key
  258. let curform=ListItemRef.value?.getFormData()
  259. console.log(curform,'curform');
  260. setAllListData(curform)
  261. if( listItemBaseData.value.detectionResult===''&&tabTypeKey.value==2){
  262. window.$message?.warning('请选择报告单是否合格')
  263. }
  264. // if(tabTypeKey.value==='2'){
  265. // leftFormData.value=ListItemRef.value?.getFormData()
  266. // }else{
  267. // rightFormData.value=ListItemRef.value?.getFormData()
  268. // }
  269. getSearchNodeTables()
  270. }
  271. //获取检测类别类型
  272. const categoryData = ref([])
  273. const getCategoryData = async () => {
  274. const { data } = await getDictionary({
  275. code: 'trial_detection_category'
  276. })
  277. const arrData = getArrValue(data)
  278. arrData.forEach(item => {
  279. item.dictKey = Number(item.dictKey)
  280. })
  281. categoryData.value = arrData
  282. }
  283. //顶部表单
  284. const ListItemRef = ref(null);
  285. const listItemBaseData = ref({
  286. sampleIds: '', contractId: null, nodeId: nodeId, trialProjectName: null, type: dataType, tableType: '1',
  287. detectionCategory: '', detectionResult: '', reportDate: '', trialUserName: '', id: dataId,
  288. })
  289. //获取数据
  290. const isLoading = ref(false)
  291. const listItemData = ref([])
  292. const listDeviceUseIds=ref('')
  293. const reportData=ref([])
  294. const testData=ref([])
  295. const alllistData=ref([])
  296. const orgAlllistData=ref([])
  297. const getSearchNodeTables = async () => {
  298. isLoading.value = true
  299. if(isaddType){
  300. const { error, code, data } = await dataApi.searchNodeTables({
  301. id: dataId.length>0?dataId:nodeIdvalue.value,
  302. projectId: projectId.value,
  303. contractId: contractId.value,
  304. primaryKeyId: nodeId,
  305. type: authBtnTabKey.value,
  306. tableType: tabTypeKey.value,
  307. isAdd: 1
  308. })
  309. //处理数据
  310. isLoading.value = false
  311. if (!error && code === 200) {
  312. listItemData.value = getArrValue(data)
  313. // console.log( listItemData.value,' listItemData.value');
  314. // defaultCheckarrIds.value= listItemData.value.projectPosition.join(',')
  315. } else {
  316. listItemData.value = []
  317. }
  318. }else{
  319. queryNodeStatus()//查询按钮状态
  320. const { error, code, data } = await dataApi.searchNodeTables({
  321. id: dataId,
  322. projectId: projectId.value,
  323. contractId: contractId.value,
  324. primaryKeyId: nodeId,
  325. type: authBtnTabKey.value,
  326. tableType: tabTypeKey.value,
  327. })
  328. //处理数据
  329. isLoading.value = false
  330. if (!error && code === 200) {
  331. listItemData.value = getArrValue(data)
  332. } else {
  333. listItemData.value = []
  334. }
  335. }
  336. }
  337. const getSearchNodeTablesall = async (type) => {
  338. orgAlllistData.value=[]
  339. const { error, code, data } = await dataApi.searchNodeTables({
  340. id: dataId.length>0?dataId:nodeIdvalue.value,
  341. projectId: projectId.value,
  342. contractId: contractId.value,
  343. primaryKeyId: nodeId,
  344. type: authBtnTabKey.value,
  345. tableType: type,
  346. // isAdd: 1
  347. isAdd:isaddType?1:''
  348. })
  349. //处理数据
  350. isLoading.value = false
  351. if (!error && code === 200) {
  352. // listItemData.value = getArrValue(data)
  353. if(type===1){
  354. testData.value= getArrValue(data)
  355. testData.value.forEach((item)=>{
  356. let bussDataInfoTrialData=item.bussDataInfoTrial
  357. if(bussDataInfoTrialData&&Object.keys(bussDataInfoTrialData).length!==0){
  358. for(var key in bussDataInfoTrialData){
  359. console.log(key,bussDataInfoTrialData[key])
  360. item[key]=bussDataInfoTrialData[key]
  361. }
  362. }
  363. orgAlllistData.value.push(item)
  364. })
  365. }else{
  366. reportData.value= getArrValue(data)
  367. reportData.value.forEach((item)=>{
  368. let bussDataInfoTrialData=item.bussDataInfoTrial
  369. if(bussDataInfoTrialData&&Object.keys(bussDataInfoTrialData).length!==0){
  370. for(var key in bussDataInfoTrialData){
  371. console.log(key,bussDataInfoTrialData[key])
  372. item[key]=bussDataInfoTrialData[key]
  373. }
  374. }
  375. orgAlllistData.value.push(item)
  376. })
  377. }
  378. } else {
  379. // listItemData.value = []
  380. if(type==1){
  381. testData.value= []
  382. alllistData.value=[]
  383. }else{
  384. reportData.value= []
  385. alllistData.value=[]
  386. }
  387. }
  388. }
  389. //改变原始数据复制隐藏本表的状态
  390. //获取数据
  391. const getTableDataAll = () => {
  392. getSearchNodeTables()
  393. queryNodeStatus()
  394. }
  395. //隐藏显示本表改变原始数据
  396. const changeorinsdate=(pKeyId,isBussShow)=>{
  397. orgAlllistData.value.forEach((item)=>{
  398. if (item.pKeyId===pKeyId) {
  399. const isBussShows = isBussShow === 2 ? 1 : 2 //状态(1显示 2隐藏)
  400. item.isBussShow=isBussShows
  401. }
  402. })
  403. console.log( orgAlllistData.value,' orgAlllistData.value');
  404. }
  405. //复制本表改变原始数据
  406. const chageorinData=()=>{
  407. getSearchNodeTablesall(1)
  408. getSearchNodeTablesall(2)
  409. }
  410. //设置滚动条位置
  411. const ListItemScrollRef = ref(null)
  412. const ListItemOffsetTop = (offsetTop) => {
  413. if (offsetTop > 0) {
  414. setTimeout(() => {
  415. ListItemScrollRef.value?.setScrollTop(offsetTop)
  416. }, 350)
  417. } else {
  418. ListItemScrollRef.value?.setScrollTop(offsetTop)
  419. }
  420. }
  421. const checkTabId=ref('')
  422. const upcheckTableId = (val) => {
  423. checkTabId.value=val
  424. }
  425. const iscanclick=ref(true)
  426. const changeIscanclick=(id)=>{
  427. iscanclick.value=false
  428. }
  429. //关联工程用途及部位 树
  430. const linksRelateModal = ref(false)
  431. const linksRelateModalClick = () => {
  432. linksRelateModal.value = true
  433. linksRelateSearchTreeVal.value=''
  434. getContractInfoTreeApi()
  435. }
  436. //获取导入树
  437. const unmatchedTreeData = ref([])
  438. const defaultCheckarrIds=ref([])
  439. const isdivisionLoading=ref(false)
  440. const getContractInfoTreeApi = async () => {
  441. isdivisionLoading.value=true
  442. const {error, code, data} = await divisionApi.getengineerInfoTree1({
  443. projectId: projectId.value,
  444. contractId: contractId.value,
  445. wbsId: projectInfo?.value.referenceWbsTemplateId,
  446. selfId:dataId
  447. })
  448. //判断状态
  449. if (!error && code === 200) {
  450. unmatchedTreeData.value = getArrValue(data['treeContractAll'])
  451. searchTreeData.value = getArrValue(data['treeContractAll'])
  452. setStoreData('unmatchedTreeData', unmatchedTreeData.value)
  453. // defaultCheckarrIds.value=getArrValue(data['isSelectedStatus'])
  454. checkrelationId.value=getArrValue(data['isSelectedStatus'])
  455. } else {
  456. unmatchedTreeData.value = []
  457. }
  458. isdivisionLoading.value=false
  459. }
  460. //关联树
  461. const divisionTreeItemInfo = ref({})
  462. const divisionTreeClick = ({data}) => {
  463. divisionTreeItemInfo.value = data
  464. }
  465. const checkrelationId=ref([])
  466. const checkrelationString=ref([])
  467. const divisionTreeCheck = (data) => {
  468. checkrelationId.value=data
  469. }
  470. const seaElTreeProps = ref({
  471. label: 'fullName',
  472. children: 'children'
  473. })
  474. const linksRelateSearchTreeVal = ref('')
  475. // watch(tabTypeKey, (val) => {
  476. // if(val){
  477. // console.log(val);
  478. // if (val==='1') {
  479. // leftFormData.value=ListItemRef.value?.getFormData()
  480. // }else{
  481. // rightFormData.value= ListItemRef.value?.getFormData()
  482. // }
  483. // }
  484. // },
  485. // )
  486. watch(linksRelateSearchTreeVal, (val) => {
  487. if(!val.length){
  488. isSearchTree.value=!isSearchTree.value
  489. }
  490. },
  491. )
  492. const linksRelateTreeLoading = ref(false)
  493. const searchTreeData = ref([])
  494. const searchlinksRelateTreeLoading = ref(false)
  495. const searchTreeKeyUp = (e) => {
  496. if (e.key === "Enter") {
  497. searchTreeClick()
  498. }
  499. }
  500. //树搜索
  501. const isSearchTree = ref(false)
  502. const searchTreeClick = async () => {
  503. if (linksRelateSearchTreeVal.value) {
  504. nextTick(()=> {
  505. isSearchTree.value=false
  506. })
  507. // const {error, code, data} = await queryApi.searchContractTree({
  508. // contractId: contractId.value,
  509. // queryValue: linksRelateSearchTreeVal.value
  510. // })
  511. // //判断状态
  512. // if (!error && code === 200) {
  513. // searchlinksRelateTreeLoading.value = false
  514. // } else {
  515. // searchlinksRelateTreeLoading.value = false
  516. // searchTreeData.value = []
  517. // }
  518. }
  519. }
  520. //确认关联
  521. const linksRelateModalSave =async () => {
  522. let idarr=[]
  523. checkrelationId.value.forEach((item)=>{
  524. idarr.push(item.primaryKeyId)
  525. })
  526. checkrelationString.value=idarr.toString()
  527. if( checkrelationString.value.length>0){
  528. listItemBaseData.value.projectPosition=checkrelationString.value
  529. }
  530. let infodata= await getpositiondata()
  531. ListItemRef.value.changePositionInput(infodata)
  532. window.$message?.success('操作成功')
  533. linksRelateModal.value = false
  534. }
  535. const linksRelateModalClose = () => {
  536. linksRelateModal.value = false
  537. }
  538. //关联原材检测报告
  539. const linksRawModal = ref(false)
  540. const MixRatioTestTreeData=ref([])
  541. const linksRawModalClick = () => {
  542. linksRawModal.value = true
  543. getTreeData()
  544. }
  545. const getTreeData=async(node,reslove)=>{
  546. const {error, code, data} = await samplingApi.getMixRatioTestTree({
  547. pKeyId: nodeId,
  548. })
  549. MixRatioTestTreeData.value = getArrValue(data)
  550. }
  551. const linkNodeid=ref('')
  552. //树被点击
  553. const linksRawTreeClick = ({data}) => {
  554. linkNodeid.value=data.pKeyId
  555. getrawMaterialList()
  556. }
  557. //原材检测报告数据
  558. const tableRawRef = ref(null)
  559. const linksRawTableColumn = ref([
  560. {key:'reportNo', name: '报告编号'},
  561. {key:'trialProjectName', name: '试验项目名称'},
  562. {key:'projectPositionName', name: '工程部位及用途'},
  563. {key:'reportDate', name: '报告日期'}
  564. ])
  565. const linksRawTableData = ref([])
  566. const linksRawTableLoading = ref(false)
  567. //多选
  568. const tableRawCheckedKeys = ref([]);
  569. const tableRawCheckedKeysid = ref('');
  570. const linksRawTableSelection = (rows) => {
  571. tableRawCheckedKeys.value = rows
  572. let arr=[]
  573. tableRawCheckedKeys.value.forEach((item)=>{
  574. arr.push(item.id)
  575. })
  576. tableRawCheckedKeysid.value=arr.join()
  577. }
  578. const linksRawModalSave =async () => {
  579. linksRawModal.value = false
  580. listItemBaseData.value.rawMaterialIds=tableRawCheckedKeysid.value
  581. window.$message?.success('操作成功')
  582. // const { error, code, data } = await dataApi.rawMaterialSubmit({
  583. // id: dataId,
  584. // ids:tableRawCheckedKeysid.value,
  585. // projectId: projectId.value,
  586. // contractId: contractId.value,
  587. // primaryKeyId: nodeId,
  588. // type: authBtnTabKey.value,
  589. // })
  590. // if (!error && code === 200) {
  591. // window.$message?.success('操作成功')
  592. // tableRawCheckedKeys.value=[]
  593. // linksRawModal.value = false
  594. // tableRawRef.value?.clearSelection();
  595. // }
  596. // else {
  597. // window.$message?.warning(error)
  598. // }
  599. }
  600. //关闭原材检测报告
  601. const linksRawModalClose = () => {
  602. linksRawModal.value = false
  603. linksRawTableData.value=[]
  604. tableRawRef.value?.clearSelection();
  605. }
  606. //关联取样
  607. const linksSampleModal = ref(false)
  608. const linksSampleModalClick = () => {
  609. linksSampleTableData.value = [];
  610. linksSampleModal.value = true
  611. }
  612. //搜索表单
  613. const linksSampleSearchForm = ref({
  614. nodeId: null, current: 1, size: 20, total: 0
  615. })
  616. //树被点击
  617. const linksSampleTreeClick = ({data}) => {
  618. linksSampleSearchForm.value.nodeId = data.primaryKeyId;
  619. linksSampleSearchForm.value.current = 1;
  620. getLinksSampleData()
  621. }
  622. //关联取样数据
  623. const tableSampleRef = ref(null)
  624. const linksSampleTableColumn = ref([
  625. {key:'materialName', name: '样品名称'},
  626. {key:'samplingDate', name: '取样日期'},
  627. {key:'specificationModel', name: '规格型号'},
  628. {key:'proposedPosition', name: '拟用部位'},
  629. {key:'userName', name: '取样人'},
  630. ])
  631. const linksSampleTableData = ref([])
  632. //获取关联数据
  633. const linksSampleTableLoading = ref(false)
  634. const getLinksSampleData = async () => {
  635. linksSampleTableLoading.value = true
  636. const { error, code, data } = await dataApi.sampleListInfo({
  637. ...linksSampleSearchForm.value,
  638. projectId: projectId.value,
  639. contractId: contractId.value,
  640. id:dataId
  641. })
  642. //处理数据
  643. linksSampleTableLoading.value = false
  644. if (!error && code === 200) {
  645. linksSampleTableData.value = getArrValue(data)
  646. linksSampleTableData.value.forEach((iten)=>{
  647. if(iten.isRelation===1){
  648. nextTick(()=>{
  649. tableSampleRef.value?.toggleRowSelection(iten,true);
  650. })
  651. }
  652. })
  653. //searchForm.value.total = data.total || 0
  654. } else {
  655. linksSampleTableData.value = []
  656. //searchForm.value.total = 0
  657. }
  658. }
  659. //获取关联原材料检测报告
  660. const getrawMaterialList = async () => {
  661. linksRawTableLoading.value = true
  662. const { error, code, data } = await dataApi.rawMaterialList({
  663. nodeId: linkNodeid.value,
  664. contractId: contractId.value,
  665. id:dataId
  666. })
  667. //处理数据
  668. linksRawTableLoading.value = false
  669. if (!error && code === 200) {
  670. linksRawTableData.value = getArrValue(data)
  671. linksRawTableData.value.forEach((iten)=>{
  672. if(iten.isRawMaterialRelation===1){
  673. nextTick(()=>{
  674. tableRawRef.value?.toggleRowSelection(iten,true);
  675. })
  676. }
  677. })
  678. //searchForm.value.total = data.total || 0
  679. } else {
  680. linksRawTableData.value = []
  681. //searchForm.value.total = 0
  682. }
  683. }
  684. //多选
  685. const tableSampleCheckedKeys = ref([]);
  686. const linksSampleTableSelection = (rows) => {
  687. tableSampleCheckedKeys.value = rows
  688. }
  689. //保存关联
  690. const linksSampleModalSave =async () => {
  691. const rows = tableSampleCheckedKeys.value
  692. listItemBaseData.value.sampleIds = rowsToId(rows) || '';
  693. window.$message?.success('操作成功')
  694. isopersampleIds.value=true
  695. let infodata= await getrecordsamplegetData()
  696. ListItemRef.value.changeSimpleInput(infodata,checkTabId.value)
  697. tableSampleCheckedKeys.value = [];
  698. linksSampleModal.value = false
  699. }
  700. //获取关联取样信息key值
  701. const getrecordsamplegetData = async() => {
  702. const { error, code, data } = await dataApi.recordsamplegetData({
  703. sampleIds: listItemBaseData.value.sampleIds,
  704. nodePKeyId:routerQuery?.nodeId,
  705. contractId:contractId.value
  706. })
  707. return data
  708. }
  709. //获取关联工程部位key值
  710. const getpositiondata = async() => {
  711. const { error, code, data } = await dataApi.recordprojectPositiongetData({
  712. projectPositionIds: listItemBaseData.value.projectPosition,
  713. nodePKeyId:routerQuery?.nodeId,
  714. contractId:contractId.value
  715. })
  716. return data
  717. }
  718. //关闭关联取样
  719. const linksSampleModalClose = () => {
  720. linksSampleModal.value = false
  721. }
  722. //保存
  723. const tableFormSaveLoading = ref(false)
  724. const tableFormSaveClick = async () => {
  725. // console.log(listItemBaseData.value,'.listItemBaseData.value');
  726. //false是编辑
  727. if(tabTypeKey.value==='2'&&listItemBaseData.value.detectionResult===''){
  728. window.$message?.warning('请选择报告单是否合格')
  729. }else{
  730. // let FormData = ListItemRef.value?.getFormData()
  731. let FormData
  732. let curform=ListItemRef.value?.getFormData()
  733. setAllListData(curform)
  734. // alllistData.value.forEach((item)=>{
  735. // if(item.pKeyId===item1.pkeyId){
  736. console.log(orgAlllistData, "orgAlllistData");
  737. let operTrue = alllistData.value.filter(e => e.oper); //操作的数据
  738. let types = []
  739. operTrue.forEach(e => {
  740. types.push(e.type);
  741. })
  742. let setTypes = Array.from(new Set(types))
  743. let type = setTypes.length > 0 ? setTypes[0] : "";
  744. if (isaddType) { //新增
  745. if (setTypes.length > 1) {
  746. FormData = alllistData.value;
  747. listItemBaseData.value.tableType = "1,2"
  748. } else {
  749. // FormData = alllistData.value.filter(e => e.type == type);
  750. if(!afterAdd.value){
  751. FormData = alllistData.value.filter(e => e.type == type);
  752. }else{
  753. let filterType=type?type:tabTypeKey.value
  754. // FormData =alllistData.value.filter(e => e.type == type);
  755. FormData =alllistData.value.filter(e => e.type == filterType);
  756. orgAlllistData.value.forEach((item1)=>{
  757. if(item1.tableType.toString()!==tabTypeKey.value){
  758. let data1 = {
  759. projectId: item1.projectId,
  760. contractId: contractId.value,
  761. pkeyId: item1.pKeyId,
  762. nodeId: routerQuery?.nodeId,
  763. isCollapseLoad: false,
  764. isBussShow:item1.isBussShow
  765. }
  766. // 过滤存在的key_的键值
  767. let ishasKey= Object.keys(item1).filter(e => e.indexOf("key_") >= 0)
  768. if (ishasKey.length > 0) {
  769. ishasKey.forEach(key => {
  770. data1[key] = item1[key]
  771. })
  772. }
  773. FormData.push(data1)
  774. }
  775. })
  776. }
  777. listItemBaseData.value.tableType = type
  778. }
  779. }
  780. else { //编辑
  781. console.log(alllistData.value,'alllistData.value');
  782. FormData = alllistData.value;
  783. const info = getStoreData('test-form')
  784. let recordNo = info.recordNo
  785. let reportNo = info.reportNo
  786. //组装type
  787. if (recordNo ==='' && reportNo !=='') {
  788. listItemBaseData.value.tableType = "2"
  789. } else if (recordNo !=='' && reportNo ==='') {
  790. listItemBaseData.value.tableType = "1"
  791. } else {
  792. listItemBaseData.value.tableType = "1,2"
  793. }
  794. console.log(listItemBaseData.value.tableType,"listItemBaseData.value.tableType ");
  795. let notChangeData = []
  796. if (setTypes.length == 0) { //没操作过页面数据
  797. FormData = []
  798. notChangeData = orgAlllistData.value //默认就是原始左右全部数据
  799. if (listItemBaseData.value.tableType.length === 1) { //从原始数据过滤当前页面数据
  800. notChangeData = orgAlllistData.value.filter(e => e.tableType === listItemBaseData.value.tableType);
  801. }
  802. }
  803. else if (setTypes.length == 1) {// 操作过一边的数据
  804. console.log(FormData,'FormData1');
  805. orgAlllistData.value.forEach((item1)=>{
  806. if(item1.tableType.toString()!==tabTypeKey.value){
  807. let data1 = {
  808. projectId: item1.projectId,
  809. contractId: contractId.value,
  810. pkeyId: item1.pKeyId,
  811. nodeId: routerQuery?.nodeId,
  812. isCollapseLoad: false,
  813. isBussShow:item1.isBussShow
  814. }
  815. // 过滤存在的key_的键值
  816. let ishasKey= Object.keys(item1).filter(e => e.indexOf("key_") >= 0)
  817. if (ishasKey.length > 0) {
  818. ishasKey.forEach(key => {
  819. data1[key] = item1[key]
  820. })
  821. }
  822. FormData.push(data1)
  823. }
  824. })
  825. console.log(FormData,'FormData22222222');
  826. let tableTypeArr = listItemBaseData.value.tableType.split(",");
  827. if (tableTypeArr[0] != type) { //两边都有数据/当前操作的数据不是进来时的选项,筛选另一边的数据
  828. listItemBaseData.value.tableType = "1,2"
  829. }
  830. } else { //两边都操作
  831. listItemBaseData.value.tableType = "1,2"
  832. }
  833. notChangeData.forEach(item => {
  834. let data = {
  835. projectId: item.projectId,
  836. contractId: contractId.value,
  837. pkeyId: item.pKeyId,
  838. nodeId: routerQuery?.nodeId,
  839. isCollapseLoad: false,
  840. isBussShow:item.isBussShow
  841. }
  842. // 过滤存在的key_的键值
  843. let ishasKey= Object.keys(item).filter(e => e.indexOf("key_") >= 0)
  844. if (ishasKey.length > 0) {
  845. ishasKey.forEach(key => {
  846. data[key] = item[key]
  847. })
  848. }
  849. FormData.push(data)
  850. })
  851. }
  852. let FormRegExpJson = ListItemRef.value?.getFormRegExpJson()
  853. console.log(isaddType,'isaddType');
  854. console.log(FormData,'FormData1111111111');
  855. if(isaddType&&FormData.length==0||!isaddType&&FormData.length==0){
  856. console.log('什么都不操作新增或者编辑');
  857. if(tabTypeKey.value ==1){
  858. FormData=alllistData.value.filter((itenel)=>{
  859. return itenel.type==1
  860. })
  861. }else if(tabTypeKey.value ==2){
  862. FormData=alllistData.value.filter((itenel)=>{
  863. return itenel.type==2
  864. })
  865. }else{
  866. FormData=alllistData.value
  867. }
  868. listItemBaseData.value.tableType=tabTypeKey.value
  869. }
  870. //效验数据
  871. if (FormData.length > 0) {
  872. if( listItemBaseData.value.detectionResult===''&& listItemBaseData.value.tableType == "1,2"){
  873. window.$message?.warning('请选择报告单是否合格')
  874. }else{
  875. tableFormSaveLoading.value = true
  876. console.log(listItemData.value,'listItemData.value');
  877. if(listItemData.value.id&&listItemData.value.id.length<0){
  878. listItemData.value.id=dataId
  879. }
  880. console.log(FormData,'lastFormData');
  881. //过滤掉已经隐藏表的数据
  882. FormData= FormData.filter((item)=>{
  883. if(item.isBussShow!==2){
  884. return item
  885. }
  886. })
  887. console.log(FormData,'lastFormData1');
  888. const {error, code,data} = await dataApi.saveExcelBussData({
  889. ...listItemBaseData.value,
  890. isBatchSave:1,
  891. dataInfo: {orderList: FormData},
  892. // deviceUseIds:listDeviceUseIds.value
  893. })
  894. nodeIdvalue.value=data
  895. tableFormSaveLoading.value = false
  896. if (!error && code === 200) {
  897. window?.$message?.success('保存成功')
  898. listItemBaseData.value.deviceUseIds=''
  899. checkTabId.value=''
  900. // alllistData.value.forEach(e => e.oper = false)
  901. alllistData.value=[]
  902. if(!isaddType){
  903. bussPdfsClick(router.currentRoute.value.query.id)
  904. // toBackClick()
  905. getSearchNodeTables()
  906. getSearchNodeTablesall(1)
  907. getSearchNodeTablesall(2)
  908. }else{
  909. listItemBaseData.value.id=data
  910. bussPdfsClick(nodeIdvalue.value)
  911. getSearchNodeTables()
  912. getSearchNodeTablesall(1)
  913. getSearchNodeTablesall(2)
  914. afterAdd.value=true
  915. // toBackClick()
  916. // setTimeout(() => {
  917. // window?.location?.reload() //刷新页面
  918. // }, 1000);
  919. }
  920. getTableDataAll()
  921. }
  922. }
  923. }
  924. }
  925. }
  926. const setAllListData = (curform) => {
  927. if(curform){
  928. curform.forEach((item)=>{
  929. let pkeyId = item.pkeyId;
  930. item.oper = false
  931. let ishasKey= Object.keys(item).filter(e => e.indexOf("key_") >= 0)
  932. if (ishasKey.length>0) { //筛出当前编辑过的数据
  933. item.oper = true
  934. }
  935. let orgData = orgAlllistData.value.filter(e => e.pKeyId === pkeyId);
  936. item.type = orgData[0]?.tableType;
  937. alllistData.value = alllistData.value.filter(e => e.pkeyId != pkeyId); //去掉老数据
  938. ishasKey= Object.keys(orgData[0]).filter(e => e.indexOf("key_") >= 0)
  939. if (!item.isCollapseLoad && ishasKey.length>0) { //没操作过,并且存在KEY
  940. ishasKey.forEach(key => {
  941. item[key] = orgData[0][key]
  942. })
  943. }
  944. alllistData.value.push(item) //加入新数据
  945. })
  946. }
  947. }
  948. //效验数据
  949. const setFormRegExpJson = (FormRegExpJson) => {
  950. let nodeName = '', itemId = '';
  951. Object.keys(FormRegExpJson).forEach(key => {
  952. const name = FormRegExpJson[key]?.nodeName ?? ''
  953. if (name) {
  954. if (nodeName) {
  955. nodeName += ',' + name
  956. } else {
  957. nodeName = name
  958. itemId = FormRegExpJson[key]?.itemId
  959. }
  960. }
  961. })
  962. //const activeKey = ListItemRef.value?.getActiveKey()
  963. //弹出提示
  964. const val = '<div style="font-size: 16px;">请先完善 <span style="color:#1ECC95;">' + nodeName + '</span> 的数据内容</div>'
  965. window?.$messageBox?.alert(val, '表单完善提醒', {
  966. confirmButtonText: '确定',
  967. dangerouslyUseHTMLString: true,
  968. callback: (action) => {
  969. if (action === 'confirm') {
  970. ListItemRef.value?.setActiveKey(itemId)
  971. ListItemOffsetTop(0)
  972. setTimeout(() => {
  973. const offsetTop = document.getElementById(itemId)?.offsetTop
  974. ListItemOffsetTop(offsetTop)
  975. }, 350)
  976. }
  977. }
  978. })
  979. }
  980. //获取数据列表
  981. const nodeItemInfo = ref({})
  982. const nodeDataInfo = ref({})
  983. //查询状态
  984. const NodeStatus = ref('1')
  985. const queryNodeStatus = async () => {
  986. const info = getStoreData('prenodeDataInfo') || {}
  987. const {error, code, data} = await wbsApi.queryNodeStatusTrial({
  988. // primaryKeyId: info['contractIdRelation'] ? info['id'] : info['primaryKeyId'],
  989. id: dataId.length>0?dataId:nodeIdvalue.value,
  990. classify: authBtnTabKey.value
  991. })
  992. //1 未填报,2待上报,3已上报
  993. if (!error && code === 200) {
  994. NodeStatus.value = data ?? '1'
  995. } else {
  996. NodeStatus.value = '1'
  997. }
  998. }
  999. //批量上报
  1000. const reportIds = ref('')
  1001. const reportTaskName = ref('')
  1002. const reportAddition = ref({})
  1003. const showReportModal = ref(false)
  1004. const reportLoading = ref(false)
  1005. const reportTypeData = ref([])
  1006. // const reportModalClick = async () => {
  1007. // showReportModal.value = true
  1008. // }
  1009. //上报完成
  1010. const showReportFinish = () => {
  1011. showReportModal.value = false
  1012. getTableDataAll()
  1013. }
  1014. const reportModalClick = async () => {
  1015. const info = getStoreData('prenodeDataInfo') || {}
  1016. console.log(info,'info');
  1017. const rows = listItemData.value;
  1018. if (rows.length > 0) {
  1019. reportLoading.value = true
  1020. const taskCheck = await eVisaTaskCheckApi({
  1021. projectId: projectId.value,
  1022. contractId: contractId.value
  1023. })
  1024. //处理数据
  1025. let newArr = [];
  1026. // console.log(rows,'rows');
  1027. for (let i = 0; i < rows.length; i++) {
  1028. newArr.push(rows[i]['pKeyId'])
  1029. }
  1030. reportTypeData.value = newArr
  1031. reportLoading.value = false
  1032. if (taskCheck) {
  1033. //初始弹出弹窗,防呆
  1034. // reportIds.value = info['primaryKeyId'] dataId
  1035. reportIds.value = dataId.length>0?dataId:nodeIdvalue.value
  1036. reportAddition.value = {
  1037. classify: authBtnTabKey.value,
  1038. contractIdRelation: info['contractIdRelation'],
  1039. }
  1040. showReportModal.value = true
  1041. //请求文件题名
  1042. const {data} = await wbsApi.queryDocumentTitle({
  1043. // primaryKeyId: info['primaryKeyId'],
  1044. primaryKeyId:dataId.length>0?dataId:nodeIdvalue.value,
  1045. classify: authBtnTabKey.value
  1046. })
  1047. reportTaskName.value = isString(data)? data : ''
  1048. }
  1049. } else {
  1050. window.$message?.warning('暂无相关数据')
  1051. }
  1052. }
  1053. //多表预览
  1054. const bussPdfsLoading = ref(false)
  1055. const nodeIdvalue=ref('')
  1056. const bussPdfsClick = async (nodeId) => {
  1057. bussPdfsLoading.value = true
  1058. const {error, code, data} = await dataApi.getBussPdfs({
  1059. projectId: projectId.value,
  1060. contractId: contractId.value,
  1061. classify: authBtnTabKey.value,
  1062. tableType: tabTypeKey.value,
  1063. // nodeId: router.currentRoute.value.query.id,
  1064. nodeId: nodeId,
  1065. })
  1066. bussPdfsLoading.value = false
  1067. if (!error && code === 200) {
  1068. window.open(data,'_blank')
  1069. } else {
  1070. window.$message?.warning('获取PDF失败')
  1071. }
  1072. }
  1073. //撤回上报流程
  1074. // const abolishOneClick = () => {
  1075. // window.$message?.warning('暂无接口')
  1076. // }
  1077. //撤回上报流程
  1078. const abolishOneClick = () => {
  1079. window?.$messageBox?.alert('请谨慎考虑后,是否确定撤回?', '撤回上报', {
  1080. showCancelButton: true,
  1081. confirmButtonText: '确定撤回',
  1082. cancelButtonText: '取消',
  1083. callback: (action) => {
  1084. if (action === 'confirm') {
  1085. abolishOneSave()
  1086. }
  1087. }
  1088. })
  1089. }
  1090. //撤回请求
  1091. const abolishOneSave = async () => {
  1092. const info = getStoreData('prenodeDataInfo') || {}
  1093. const {error, code} = await wbsApi.abolishOne({
  1094. // primaryKeyId: info?.primaryKeyId || '',
  1095. primaryKeyId: dataId.length>0?dataId:nodeIdvalue.value,
  1096. classify: authBtnTabKey.value
  1097. })
  1098. if (!error && code === 200) {
  1099. window.$message?.success('撤回成功')
  1100. getTableDataAll()
  1101. }
  1102. }
  1103. //返回
  1104. const toBackClick = () => {
  1105. router.push({
  1106. path: '/tentative/detect/test',
  1107. query: {}
  1108. })
  1109. setTimeout(() => {
  1110. window?.location?.reload() //刷新页面
  1111. }, 1000);
  1112. }
  1113. const updeviceUseIds = (val) => {
  1114. listItemBaseData.value.deviceUseIds=val
  1115. }
  1116. </script>
  1117. <style lang="scss" scoped>
  1118. @import "../../../styles/tentative/detect/test-form.scss";
  1119. .hc-table-form-action-tip {
  1120. position: absolute;
  1121. bottom: 77px;
  1122. width: 100%;
  1123. }
  1124. .hc-table-form-action-tip .hc-alert {
  1125. background-color:#f1f5f8;
  1126. display: inline;
  1127. vertical-align: middle;
  1128. box-shadow: -2px 0 10px 0 rgba(32,37,50,0.03), 0 10px 21px 20px rgba(32,37,50,0.03);
  1129. }
  1130. </style>