tree.vue 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531
  1. <template>
  2. <div style="height: 100%">
  3. <basic-container v-show="showType == 1">
  4. <el-row :gutter="20" class="h-100p">
  5. <el-col :span="10" class="h-100p">
  6. <div class="h-100p flex flex-d-c">
  7. <p>工程节点信息</p>
  8. <div class="flex">
  9. <el-input
  10. placeholder="输入关键字进行过滤"
  11. v-model="filterText"
  12. @input="filterChange"
  13. clearable
  14. ></el-input>
  15. <!-- <el-button type="info" class="mg-l-20">导入划分</el-button> -->
  16. </div>
  17. <div class="flex1 ov-hidden">
  18. <el-scrollbar class="h-100p">
  19. <div v-loading="treeLoad">
  20. <el-tree
  21. v-show="!filterText"
  22. class="filter-tree"
  23. lazy
  24. :data="treeData"
  25. :load="loadNode"
  26. @node-click="getNodeDetail"
  27. :props="defaultProps"
  28. :expand-on-click-node="false"
  29. highlight-current
  30. node-key="id"
  31. ref="tree"
  32. :default-expanded-keys="defaultExpandedKeys"
  33. >
  34. <span
  35. class="custom-tree-node"
  36. :class="data.moreShow ? 'show' : ''"
  37. slot-scope="{ node, data }"
  38. >
  39. <!--@mouseover="mouseover(data)" @mouseleave="mouseout(data)"-->
  40. <span class="pd-r-20">
  41. {{ node.label }}
  42. <span class="normal-black">
  43. <el-link :underline="false">
  44. <i
  45. class="el-icon-sort"
  46. @click="sortpai(data, node)"
  47. v-if="node.level != 1"
  48. title="调整排序"
  49. ></i>
  50. </el-link>
  51. <el-link :underline="false">
  52. <i
  53. class="el-icon-upload"
  54. style="margin-left: 2px"
  55. @click="syncNodeTableHandle(data, node)"
  56. title="同步元素表单"
  57. ></i>
  58. </el-link>
  59. <el-link :underline="false">
  60. <i
  61. class="el-icon-upload"
  62. style="margin-left: 2px"
  63. @click="syncProjectHandle(data, node)"
  64. title="同步项目信息到合同段"
  65. ></i>
  66. </el-link>
  67. </span>
  68. <!-- <el-dropdown
  69. @click="command=>{setLeftType(command,data)}"
  70. @visible-change="visiblechange($event,data)"
  71. >
  72. <el-button
  73. type="text"
  74. icon="el-icon-more"
  75. class="normal-black"
  76. >
  77. </el-button>
  78. <el-dropdown-menu slot="dropdown">
  79. <el-dropdown-item
  80. @click.native="setLeftType(2,data,node)"
  81. icon="el-icon-edit"
  82. >编辑节点</el-dropdown-item>
  83. <el-dropdown-item
  84. @click.native="setLeftType(3,data,node)"
  85. icon="el-icon-document-copy"
  86. >复制节点</el-dropdown-item>
  87. <el-dropdown-item
  88. @click.native="deleNode(data,node)"
  89. icon="el-icon-close"
  90. v-if="node.level !=1"
  91. >删除节点</el-dropdown-item>
  92. <el-dropdown-item
  93. @click.native="setLeftType(4,data,node)"
  94. icon="iconfont hcicon-danganziliao-biaogetianxie"
  95. class="font-s-12"
  96. >元素公式</el-dropdown-item>
  97. <el-dropdown-item
  98. @click.native="setLeftType(5,data,node)"
  99. icon="el-icon-coin"
  100. >元素设置</el-dropdown-item>
  101. <el-dropdown-item
  102. @click.native="nodeInfo(data,node)"
  103. icon="el-icon-help"
  104. >节点参数</el-dropdown-item>
  105. <el-dropdown-item
  106. @click.native="importTemplate(data,node)"
  107. v-if="node.level == 2"
  108. icon="el-icon-upload"
  109. >导入划分</el-dropdown-item>
  110. <el-dropdown-item
  111. v-if="data.parentId!=0"
  112. @click.native="sortpai(data,node)"
  113. icon="el-icon-sort"
  114. >调整排序</el-dropdown-item>
  115. </el-dropdown-menu>
  116. </el-dropdown> -->
  117. </span>
  118. </span>
  119. </el-tree>
  120. <el-tree
  121. v-show="filterText"
  122. class="filter-tree"
  123. :data="treeData"
  124. @node-click="getNodeDetail"
  125. :props="defaultProps"
  126. :expand-on-click-node="false"
  127. highlight-current
  128. node-key="id"
  129. :filter-node-method="filterNode"
  130. ref="treeall"
  131. >
  132. <span
  133. class="custom-tree-node"
  134. slot-scope="{ node, data }"
  135. :class="data.moreShow ? 'show' : ''"
  136. >
  137. <span class="pd-r-20">
  138. {{ node.label }}
  139. <span class="normal-black">
  140. <el-link :underline="false">
  141. <i
  142. class="el-icon-sort"
  143. @click="sortpai(data, node)"
  144. v-if="node.level != 1"
  145. title="调整排序"
  146. ></i>
  147. </el-link>
  148. <el-link :underline="false">
  149. <i
  150. class="el-icon-upload"
  151. style="margin-left: 2px"
  152. @click="syncNodeTableHandle(data, node)"
  153. title="同步元素表单"
  154. ></i>
  155. </el-link>
  156. </span>
  157. <!-- <el-dropdown
  158. @click="command=>{setLeftType(command,data)}"
  159. @visible-change="visiblechange($event,data)"
  160. >
  161. <el-button
  162. type="text"
  163. icon="el-icon-more"
  164. class="normal-black"
  165. >
  166. </el-button>
  167. <el-dropdown-menu slot="dropdown">
  168. <el-dropdown-item
  169. @click.native="setLeftType(2,data,node)"
  170. icon="el-icon-edit"
  171. >编辑节点</el-dropdown-item>
  172. <el-dropdown-item
  173. @click.native="setLeftType(3,data,node)"
  174. icon="el-icon-document-copy"
  175. >复制节点</el-dropdown-item>
  176. <el-dropdown-item
  177. @click.native="deleNode(data,node)"
  178. icon="el-icon-close"
  179. v-if="node.level !=1"
  180. >删除节点</el-dropdown-item>
  181. <el-dropdown-item
  182. @click.native="setLeftType(4,data,node)"
  183. icon="iconfont hcicon-danganziliao-biaogetianxie"
  184. class="font-s-12"
  185. >元素公式</el-dropdown-item>
  186. <el-dropdown-item
  187. @click.native="setLeftType(5,data,node)"
  188. icon="el-icon-coin"
  189. >元素设置</el-dropdown-item>
  190. <el-dropdown-item
  191. @click.native="nodeInfo(data)"
  192. icon="el-icon-help"
  193. >节点参数</el-dropdown-item>
  194. <el-dropdown-item
  195. @click.native="importTemplate(data,node)"
  196. v-if="node.level == 2"
  197. icon="el-icon-upload"
  198. >导入划分</el-dropdown-item>
  199. </el-dropdown-menu>
  200. </el-dropdown> -->
  201. </span>
  202. </span>
  203. </el-tree>
  204. </div>
  205. </el-scrollbar>
  206. </div>
  207. </div>
  208. </el-col>
  209. <el-col :span="14" class="h-100p flex flex-d-c">
  210. <div class="mg-b-10">
  211. <el-button
  212. type="primary"
  213. size="medium"
  214. icon="el-icon-edit-outline"
  215. @click="editNodeHandle"
  216. >编辑当前节点</el-button
  217. >
  218. <el-button
  219. type="primary"
  220. size="medium"
  221. icon="el-icon-document-copy"
  222. @click="copyNodeHandle"
  223. >复制当前节点</el-button
  224. >
  225. <el-button
  226. type="warning"
  227. size="medium"
  228. icon="el-icon-delete"
  229. @click="delNodeHandle"
  230. >删除当前节点</el-button
  231. >
  232. <el-button
  233. class="el-btn-purple"
  234. type="primary"
  235. size="medium"
  236. icon="el-icon-s-grid"
  237. @click="eleFormulaHandle"
  238. v-if="leftType == 5"
  239. >表单设置</el-button
  240. >
  241. <el-button
  242. class="el-btn-purple"
  243. type="primary"
  244. size="medium"
  245. icon="el-icon-s-grid"
  246. @click="eleHandle"
  247. v-else
  248. >元素设置</el-button
  249. >
  250. <el-button
  251. class="el-btn-purple"
  252. type="primary"
  253. size="medium"
  254. icon="el-icon-help"
  255. @click="nodeInfoHandle"
  256. >节点参数设置</el-button
  257. >
  258. <el-button
  259. class="el-btn-purple"
  260. type="primary"
  261. size="medium"
  262. icon="el-icon-upload"
  263. :loading="syncBtnLoad"
  264. @click="syncInfoHandle"
  265. >同步节点参数</el-button
  266. >
  267. <el-button
  268. class="el-btn-purple"
  269. type="primary"
  270. size="medium"
  271. icon="el-icon-upload"
  272. @click="independent"
  273. >独立表单库</el-button
  274. >
  275. </div>
  276. <template v-if="leftType == 5">
  277. <div class="mg-b-10">节点信息</div>
  278. <div>
  279. <el-table :data="tableData" border style="width: 100%">
  280. <el-table-column
  281. align="center"
  282. prop="nodeName"
  283. label="当前节点"
  284. ></el-table-column>
  285. <el-table-column
  286. align="center"
  287. prop="nodeType"
  288. :formatter="formatCat"
  289. label="节点类型"
  290. width="180"
  291. ></el-table-column>
  292. <el-table-column
  293. align="center"
  294. prop="parentName"
  295. label="上级节点"
  296. ></el-table-column>
  297. </el-table>
  298. </div>
  299. <div class="flex jc-sb">
  300. <p>
  301. <span>当前项目信息表</span>
  302. <!-- <el-button
  303. @click="showFormElement"
  304. type="text"
  305. icon="el-icon-circle-plus-outline"
  306. class="text-icon mg-l-10"
  307. ></el-button>
  308. <el-button
  309. type="text"
  310. icon="el-icon-document-copy"
  311. class="text-icon"
  312. ></el-button> -->
  313. <el-button
  314. type="text"
  315. style="margin-left: 10px"
  316. icon="el-icon-edit-outline"
  317. class="text-icon"
  318. @click="editEditElementForm()"
  319. ></el-button>
  320. <el-button
  321. type="text"
  322. icon="el-icon-sort"
  323. class="text-icon"
  324. @click="privateTableSort()"
  325. ></el-button>
  326. </p>
  327. <div class="mg-t-10"></div>
  328. </div>
  329. <div style="flex: 1; position: relative">
  330. <el-table
  331. :data="formData"
  332. border
  333. height="100%"
  334. style="width: 100%; position: absolute"
  335. >
  336. <el-table-column
  337. align="center"
  338. prop="tableName"
  339. label="表单名称"
  340. ></el-table-column>
  341. <el-table-column
  342. align="center"
  343. prop="elementTotal"
  344. width="80"
  345. label="字段总量"
  346. ></el-table-column>
  347. <el-table-column
  348. align="center"
  349. prop="fillRate"
  350. width="100"
  351. label="填报率"
  352. ></el-table-column>
  353. <el-table-column
  354. align="center"
  355. prop="tableType"
  356. :formatter="formatTableType"
  357. width="100"
  358. label="表单类型"
  359. ></el-table-column>
  360. <el-table-column
  361. align="center"
  362. prop="tableOwner"
  363. :formatter="formatOwner"
  364. label="所属方"
  365. ></el-table-column>
  366. <el-table-column label="操作" width="240">
  367. <template slot-scope="scope">
  368. <el-button
  369. size="mini"
  370. @click="handleEdit(scope.$index, scope.row)"
  371. >预览</el-button
  372. >
  373. <el-button
  374. size="mini"
  375. type="primary"
  376. v-throttle="3000"
  377. v-show="scope.row.status == 0"
  378. @click="hideMD(scope.row)"
  379. >取消隐藏</el-button
  380. >
  381. <el-button
  382. size="mini"
  383. type="primary"
  384. v-throttle="3000"
  385. v-show="scope.row.status == 1"
  386. @click="hideMD(scope.row)"
  387. >隐藏表单</el-button
  388. >
  389. <el-button
  390. size="mini"
  391. type="danger"
  392. @click="handleDelete(scope.$index, scope.row)"
  393. >删除</el-button
  394. >
  395. </template>
  396. </el-table-column>
  397. </el-table>
  398. </div>
  399. </template>
  400. <template v-if="leftType == 4">
  401. <div style="flex: 1; position: relative">
  402. <el-table
  403. :data="formData"
  404. border
  405. height="100%"
  406. style="width: 100%; position: absolute"
  407. >
  408. <el-table-column
  409. align="center"
  410. prop="tableName"
  411. label="表单名称"
  412. ></el-table-column>
  413. <el-table-column
  414. align="center"
  415. prop="tableType"
  416. :formatter="formatTableType"
  417. label="表单类型"
  418. ></el-table-column>
  419. <el-table-column
  420. align="center"
  421. prop="fillRate"
  422. label="填报率"
  423. ></el-table-column>
  424. <el-table-column
  425. label="是否关联清表"
  426. prop="isLinkTable"
  427. align="center"
  428. >
  429. <template slot-scope="scope">
  430. <span v-if="scope.row.isLinkTable == 2">是</span>
  431. <span v-else>否</span>
  432. </template>
  433. </el-table-column>
  434. <el-table-column
  435. align="center"
  436. prop="tableOwner"
  437. :formatter="formatOwner"
  438. label="所属方"
  439. ></el-table-column>
  440. <el-table-column label="操作" width="400" align="center">
  441. <template slot-scope="scope">
  442. <el-link type="primary" @click="Associationlist(scope)"
  443. >关联清表</el-link
  444. >
  445. <el-link
  446. class="mg-l-10"
  447. type="primary"
  448. :disabled="scope.row.excelId == -1"
  449. @click="
  450. rightClick(
  451. scope.row.pkeyId,
  452. scope.row.excelId,
  453. scope.row.id,
  454. scope.row.initTableName,
  455. scope.row.initTableId
  456. )
  457. "
  458. >编辑元素</el-link
  459. >
  460. <el-link
  461. class="mg-l-10"
  462. type="primary"
  463. :disabled="scope.row.excelId == -1"
  464. @click="adjustExcel(scope.row.pkeyId, scope.row.excelId)"
  465. >调整表单</el-link
  466. >
  467. <el-link
  468. class="mg-l-10"
  469. type="primary"
  470. @click="handleEditFormula(scope.$index, scope.row)"
  471. >编辑元素公式.</el-link
  472. >
  473. <el-link
  474. class="mg-l-10"
  475. type="danger"
  476. @click="handleDelete(scope.$index, scope.row)"
  477. >删除表单</el-link
  478. >
  479. </template>
  480. </el-table-column>
  481. </el-table>
  482. </div>
  483. </template>
  484. </el-col>
  485. </el-row>
  486. </basic-container>
  487. <el-row class="h-100p" v-show="showType == 2">
  488. <el-col :span="6" class="h-100p">
  489. <basic-container>
  490. <el-scrollbar class="h-100p">
  491. <el-tree
  492. class="filter-tree"
  493. lazy
  494. :data="typeTreeData"
  495. :load="typeTreeLoadNode"
  496. @node-click="getTypeTreeDetail"
  497. :props="defaultProps"
  498. :expand-on-click-node="false"
  499. highlight-current
  500. node-key="id"
  501. >
  502. </el-tree>
  503. </el-scrollbar>
  504. </basic-container>
  505. </el-col>
  506. <el-col :span="18" class="h-100p">
  507. <basic-container>
  508. <div class="flex h-100p flex-d-c">
  509. <div style="flex: 1; position: relative">
  510. <el-table
  511. :data="formData"
  512. border
  513. height="100%"
  514. style="width: 100%; position: absolute"
  515. >
  516. <el-table-column
  517. align="center"
  518. prop="tableName"
  519. label="表单名称"
  520. ></el-table-column>
  521. <el-table-column
  522. align="center"
  523. prop="tableType"
  524. :formatter="formatTableType"
  525. label="表单类型"
  526. ></el-table-column>
  527. <el-table-column
  528. align="center"
  529. prop="fillRate"
  530. label="填报率"
  531. ></el-table-column>
  532. <el-table-column
  533. label="是否关联清表"
  534. prop="isLinkTable"
  535. align="center"
  536. >
  537. <template slot-scope="scope">
  538. <span v-if="scope.row.isLinkTable == 2">是</span>
  539. <span v-else>否</span>
  540. </template>
  541. </el-table-column>
  542. <el-table-column
  543. align="center"
  544. prop="tableOwner"
  545. :formatter="formatOwner"
  546. label="所属方"
  547. ></el-table-column>
  548. <el-table-column label="操作" width="400" align="center">
  549. <template slot-scope="scope">
  550. <el-link type="primary" @click="Associationlist(scope)"
  551. >关联清表</el-link
  552. >
  553. <el-link
  554. class="mg-l-10"
  555. type="primary"
  556. :disabled="scope.row.excelId == -1"
  557. @click="
  558. rightClick(
  559. scope.row.pkeyId,
  560. scope.row.excelId,
  561. scope.row.id,
  562. scope.row.initTableName,
  563. scope.row.initTableId
  564. )
  565. "
  566. >编辑元素</el-link
  567. >
  568. <el-link
  569. class="mg-l-10"
  570. type="primary"
  571. :disabled="scope.row.excelId == -1"
  572. @click="adjustExcel(scope.row.pkeyId, scope.row.excelId)"
  573. >调整表单</el-link
  574. >
  575. <el-link
  576. class="mg-l-10"
  577. type="primary"
  578. @click="handleEditFormula(scope.$index, scope.row)"
  579. >编辑元素公式</el-link
  580. >
  581. <el-link
  582. class="mg-l-10"
  583. type="danger"
  584. @click="handleDelete(scope.$index, scope.row)"
  585. >删除表单</el-link
  586. >
  587. </template>
  588. </el-table-column>
  589. </el-table>
  590. </div>
  591. <div class="mg-t-10 flex jc-sb">
  592. <div></div>
  593. <el-button size="medium" @click="showType = 1"
  594. >返回WBS树</el-button
  595. >
  596. </div>
  597. </div>
  598. </basic-container>
  599. </el-col>
  600. </el-row>
  601. <!-- 编辑元素表单信息 -->
  602. <el-dialog
  603. title="编辑元素表单信息"
  604. :visible.sync="editElementFormTag"
  605. width="60%"
  606. :modal-append-to-body="false"
  607. >
  608. <div>
  609. <el-table :data="formDatass" border style="width: 100%">
  610. <el-table-column prop="tableName" label="表名">
  611. <template slot-scope="scope">
  612. <el-input
  613. v-model="scope.row.tableName"
  614. placeholder="请输入表名称"
  615. ></el-input>
  616. </template>
  617. </el-table-column>
  618. <el-table-column prop="tableType" label="表类型">
  619. <template slot-scope="scope">
  620. <el-select v-model="scope.row.tableType" placeholder="请选择">
  621. <el-option
  622. v-for="(item, key) in tableTypelist"
  623. :key="key"
  624. :label="item.dictValue"
  625. :value="item.dictKey"
  626. >
  627. </el-option>
  628. </el-select>
  629. </template>
  630. </el-table-column>
  631. <el-table-column prop="tableOwner" label="所属方">
  632. <template slot-scope="scope">
  633. <el-select v-model="scope.row.tableOwner" placeholder="请选择">
  634. <el-option
  635. v-for="(item, key) in ownerTypeList"
  636. :key="key"
  637. :label="item.dictValue"
  638. :value="item.dictKey"
  639. >
  640. </el-option>
  641. </el-select>
  642. </template>
  643. </el-table-column>
  644. <el-table-column prop="fillRate" label="填报率">
  645. <template slot-scope="scope">
  646. <el-input
  647. v-model="scope.row.fillRate"
  648. placeholder="请输入填报率"
  649. ></el-input>
  650. </template>
  651. </el-table-column>
  652. </el-table>
  653. </div>
  654. <span slot="footer" class="dialog-footer">
  655. <el-button @click="editElementFormTag = false">取 消</el-button>
  656. <el-button type="primary" @click="editeditElementFormMF()" :loading="editeditElementFormMFLoading"
  657. >确 定</el-button
  658. >
  659. </span>
  660. </el-dialog>
  661. <!-- 调整表单模板 -->
  662. <div v-if="excelHtml" class="excelHtml">
  663. <dynamicExcel
  664. @remove="removeExcel"
  665. v-if="excelHtml"
  666. :pkeyId="GLExcelFrom.id"
  667. />
  668. </div>
  669. <!-- 私有wbs树排序弹框 -->
  670. <el-dialog
  671. title="调整排序"
  672. :visible.sync="sortTag"
  673. width="50%"
  674. append-to-body
  675. >
  676. <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
  677. <span slot="footer" class="dialog-footer">
  678. <el-button @click="(sortTag = false), (sortTag2 = false)"
  679. >取 消</el-button
  680. >
  681. <el-button type="primary" @click="editSort()">确 定</el-button>
  682. </span>
  683. </el-dialog>
  684. <!-- 元素表排序 -->
  685. <el-dialog
  686. title="调整排序"
  687. :visible="excelSortTag"
  688. width="50%"
  689. append-to-body
  690. >
  691. <ManualSorting
  692. v-if="excelSortTag2"
  693. @bianhua="bianhua2()"
  694. :sort="tableSortList"
  695. />
  696. <span slot="footer" class="dialog-footer">
  697. <el-button @click="excelSortTag = false">取 消</el-button>
  698. <el-button type="primary" @click="editPrivateSort()">确 定</el-button>
  699. </span>
  700. </el-dialog>
  701. <!-- 关联清表 -->
  702. <el-dialog
  703. title="关联清表"
  704. class="excelBox"
  705. :visible.sync="GLExcel"
  706. width="500px"
  707. modal-append-to-body
  708. append-to-body
  709. @close="GLExcelMD"
  710. >
  711. <div>
  712. <el-select
  713. style="width: 400px"
  714. v-model="GLExcelFrom.name"
  715. placeholder="请选择"
  716. @change="changetherr()"
  717. >
  718. <el-option
  719. v-for="(item, key) in GLExcelData"
  720. :key="key"
  721. :label="item.name"
  722. :value="item.id"
  723. >
  724. </el-option>
  725. </el-select>
  726. <el-scrollbar style="margin-top: 20px; height: 50vh">
  727. <el-input
  728. style="width: 400px"
  729. v-model.trim="GLExcelFrom.search"
  730. placeholder="请输入需要选择的内容"
  731. ></el-input>
  732. <el-tree
  733. :filter-node-method="filterNode222"
  734. ref="tree"
  735. class="filter-tree"
  736. style="margin-top: 10px"
  737. :props="GLExcelProps"
  738. :data="exceldata"
  739. node-key="id"
  740. accordion
  741. show-checkbox
  742. @check="checkchange"
  743. v-loading="GLExcelLoading"
  744. >
  745. </el-tree>
  746. </el-scrollbar>
  747. </div>
  748. <span
  749. slot="footer"
  750. class="dialog-footer"
  751. style="display: flex; justify-content: center; align-items: center"
  752. >
  753. <el-button @click="GLExcelMD()">取 消</el-button>
  754. <el-button
  755. style="margin-left: 30px"
  756. type="primary"
  757. v-throttle="2000"
  758. @click="saveLinkTab()"
  759. >确 定</el-button
  760. >
  761. </span>
  762. </el-dialog>
  763. <!-- 节点详情 -->
  764. <el-dialog
  765. :title="dialogTitle"
  766. :visible.sync="dialogVisible"
  767. width="50%"
  768. append-to-body
  769. :close-on-click-modal="false"
  770. @closed="saveNodeLoading = false"
  771. >
  772. <el-form
  773. ref="nodeDetail"
  774. :model="nodeDetail"
  775. :rules="rules"
  776. label-width="140px"
  777. >
  778. <el-form-item label="节点名称" prop="nodeName">
  779. <div class="flex">
  780. <el-input v-model="nodeDetail.nodeName"></el-input>
  781. <el-button class="mg-l-10" type="primary" @click="aliasShow"
  782. >添加别名</el-button
  783. >
  784. </div>
  785. </el-form-item>
  786. <el-form-item label="上级节点">
  787. <el-input v-model="nodeDetail.parentName" disabled></el-input>
  788. </el-form-item>
  789. <el-form-item label="节点类型" prop="nodeType">
  790. <el-select
  791. v-model="nodeDetail.nodeType"
  792. disabled
  793. placeholder="请选择"
  794. class="w-100p"
  795. @change="nodeTypeChange"
  796. >
  797. <el-option
  798. v-for="item in nodeTypelist"
  799. :key="item.id"
  800. :label="item.dictValue"
  801. :value="item.dictKey"
  802. ></el-option>
  803. </el-select>
  804. </el-form-item>
  805. <el-form-item label="划分编号" v-if="wbsType !== 2">
  806. <el-input v-model="nodeDetail.partitionCode"></el-input>
  807. </el-form-item>
  808. <el-form-item label="唯一编码">
  809. <el-input v-model="nodeDetail.uniqueCode"></el-input>
  810. </el-form-item>
  811. <template v-if="nodeDetail.nodeType == 6">
  812. <el-form-item label="是否有混凝土">
  813. <el-radio-group v-model="nodeDetail.isConcrete" size="small">
  814. <el-radio :label="0" border>无</el-radio>
  815. <el-radio :label="1" border>有</el-radio>
  816. </el-radio-group>
  817. </el-form-item>
  818. <el-form-item label="是否试验节点">
  819. <el-radio-group v-model="nodeDetail.isExpernode" size="small">
  820. <el-radio :label="0" border>否</el-radio>
  821. <el-radio :label="1" border>是</el-radio>
  822. </el-radio-group>
  823. </el-form-item>
  824. </template>
  825. <el-form-item
  826. label="内业资料类型"
  827. prop="majorDataType"
  828. v-if="wbsType !== 2"
  829. >
  830. <el-select
  831. v-model="nodeDetail.majorDataType"
  832. disabled
  833. placeholder="请选择"
  834. class="w-100p"
  835. >
  836. <el-option
  837. v-for="item in majorDataTypeList"
  838. :key="item.id"
  839. :label="item.dictValue"
  840. :value="item.dictKey"
  841. ></el-option>
  842. </el-select>
  843. </el-form-item>
  844. <el-form-item
  845. label="勾选相关联试验"
  846. prop="mixRatioTestIds"
  847. v-if="wbsType === 2 && nodeDetail.nodeType === 53"
  848. >
  849. <div
  850. style="position: relative; height: 300px; border: 1px solid #dddfe6"
  851. >
  852. <el-scrollbar class="h-100p">
  853. <div v-loading="testTreeLoad">
  854. <el-tree
  855. class="filter-tree"
  856. :data="testTreeData"
  857. :props="defaultProps"
  858. :expand-on-click-node="false"
  859. highlight-current
  860. node-key="id"
  861. ref="treeall"
  862. show-checkbox
  863. :default-checked-keys="mixRatioTestIds"
  864. @check="TestTreeCheckChange"
  865. />
  866. </div>
  867. </el-scrollbar>
  868. </div>
  869. </el-form-item>
  870. </el-form>
  871. <span slot="footer" class="dialog-footer">
  872. <el-button @click="dialogVisible = false">取 消</el-button>
  873. <el-button type="primary" @click="saveNode" :loading="saveNodeLoading"
  874. >确 定</el-button
  875. >
  876. </span>
  877. </el-dialog>
  878. <!-- 创建新的元素表 -->
  879. <el-dialog
  880. title="创建新的元素表"
  881. :visible.sync="eleVisible"
  882. width="80%"
  883. append-to-body
  884. :close-on-click-modal="false"
  885. >
  886. <el-form
  887. ref="eleDialog"
  888. :model="eleForm"
  889. :rules="eleRules"
  890. label-width="110px"
  891. >
  892. <el-form-item label="表名" prop="nodeName">
  893. <el-input v-model="eleForm.nodeName"></el-input>
  894. </el-form-item>
  895. <el-row>
  896. <el-col :span="12">
  897. <el-form-item label="表类型" prop="tableType">
  898. <el-select
  899. v-model="eleForm.tableType"
  900. placeholder="请选择"
  901. class="w-100p"
  902. >
  903. <el-option
  904. v-for="item in tableTypelist"
  905. :key="item.id"
  906. :label="item.dictValue"
  907. :value="item.dictKey"
  908. ></el-option>
  909. </el-select>
  910. </el-form-item>
  911. </el-col>
  912. <el-col :span="12">
  913. <el-form-item label="所属方" prop="tableOwner">
  914. <el-select
  915. v-model="eleForm.tableOwner"
  916. placeholder="请选择"
  917. class="w-100p"
  918. >
  919. <el-option
  920. v-for="item in ownerTypeList"
  921. :key="item.id"
  922. :label="item.dictValue"
  923. :value="item.dictKey"
  924. ></el-option>
  925. </el-select>
  926. </el-form-item>
  927. </el-col>
  928. </el-row>
  929. </el-form>
  930. <div class="flex jc-sb">
  931. <div></div>
  932. <div>
  933. <el-link type="primary" @click="importVisible = true"
  934. >快捷导入</el-link
  935. >
  936. <el-link type="primary" class="mg-l-20" @click="downloadTmp"
  937. >下载导入模版</el-link
  938. >
  939. </div>
  940. </div>
  941. <div class="border-grey">
  942. <p class="font-c-warning">编辑元素信息(请谨慎操作)</p>
  943. <el-table
  944. :data="eleForm.elementList"
  945. border
  946. style="width: 100%"
  947. height="400px"
  948. >
  949. <el-table-column
  950. align="center"
  951. type="index"
  952. width="50"
  953. ></el-table-column>
  954. <el-table-column align="center" prop="eName" label="字段名称">
  955. <template slot-scope="scope">
  956. <el-input
  957. v-model="scope.row.eName"
  958. size="small"
  959. placeholder="请输入内容"
  960. ></el-input>
  961. </template>
  962. </el-table-column>
  963. <el-table-column
  964. align="center"
  965. prop="eType"
  966. label="数据类型"
  967. width="120"
  968. >
  969. <template slot-scope="scope">
  970. <el-select
  971. v-model="scope.row.eType"
  972. size="small"
  973. placeholder="请选择"
  974. >
  975. <el-option
  976. v-for="item in dataTypeList"
  977. :key="item.id"
  978. :label="item.dictValue"
  979. :value="item.dictKey"
  980. ></el-option>
  981. </el-select>
  982. </template>
  983. </el-table-column>
  984. <el-table-column
  985. align="center"
  986. prop="eLength"
  987. label="长度"
  988. width="120"
  989. >
  990. <template slot-scope="scope">
  991. <el-input
  992. v-model="scope.row.eLength"
  993. size="small"
  994. placeholder="请输入内容"
  995. :disabled="scope.row.eType == 4"
  996. ></el-input>
  997. </template>
  998. </el-table-column>
  999. <el-table-column
  1000. align="center"
  1001. prop="eAllowDeviation"
  1002. label="允许偏差值"
  1003. >
  1004. <template slot-scope="scope">
  1005. <div class="flex">
  1006. <el-select
  1007. v-model="scope.row.allow"
  1008. size="small"
  1009. placeholder="请选择"
  1010. style="width: 120px"
  1011. >
  1012. <el-option :key="1" label="≥" value="≥"></el-option>
  1013. <el-option :key="2" label="≤" value="≤"></el-option>
  1014. <el-option :key="3" label="±" value="±"></el-option>
  1015. <el-option :key="4" label="【】" value="【】"></el-option>
  1016. </el-select>
  1017. <el-input
  1018. v-model="scope.row.deviation"
  1019. size="small"
  1020. placeholder="请输入内容"
  1021. ></el-input>
  1022. </div>
  1023. </template>
  1024. </el-table-column>
  1025. <el-table-column
  1026. align="center"
  1027. prop="eInspectionMethod"
  1028. label="检查方法和频率"
  1029. >
  1030. <template slot-scope="scope">
  1031. <el-input
  1032. v-model="scope.row.eInspectionMethod"
  1033. size="small"
  1034. placeholder="请输入内容"
  1035. ></el-input>
  1036. </template>
  1037. </el-table-column>
  1038. <el-table-column align="center" label="操作" width="80">
  1039. <template slot="header">
  1040. <el-button
  1041. @click="addEleRow(eleForm.elementList)"
  1042. type="text"
  1043. icon="el-icon-circle-plus-outline"
  1044. class="text-icon"
  1045. ></el-button>
  1046. </template>
  1047. <template slot-scope="scope">
  1048. <el-button
  1049. icon="el-icon-remove-outline"
  1050. type="text"
  1051. @click="delEleRow(scope.$index, eleForm.elementList)"
  1052. class="text-icon text-icon-danger"
  1053. ></el-button>
  1054. </template>
  1055. </el-table-column>
  1056. </el-table>
  1057. </div>
  1058. <span slot="footer" class="dialog-footer">
  1059. <el-button @click="eleVisible = false">取 消</el-button>
  1060. <el-button type="primary" @click="saveFormAndElementHandle"
  1061. >保 存</el-button
  1062. >
  1063. </span>
  1064. </el-dialog>
  1065. <!-- 模板导入 -->
  1066. <el-dialog
  1067. title="模版导入"
  1068. :visible.sync="importVisible"
  1069. width="50%"
  1070. append-to-body
  1071. :close-on-click-modal="false"
  1072. >
  1073. <p>
  1074. 提示:必须按照系统要求的模版格式上传,否则系统识别无效
  1075. <el-link type="primary" @click="downloadTmp">下载导入模版</el-link>
  1076. </p>
  1077. <div>
  1078. <el-button size="small" type="primary" @click="fileClick2"
  1079. >本地上传</el-button
  1080. >
  1081. <input
  1082. @change="tmpImport"
  1083. type="file"
  1084. hidden
  1085. ref="file2"
  1086. accept=".xls, .xlsx"
  1087. />
  1088. </div>
  1089. <el-table :data="tempList" border style="width: 100%">
  1090. <el-table-column align="center" prop="eName" label="字段信息">
  1091. </el-table-column>
  1092. <el-table-column
  1093. align="center"
  1094. prop="eType"
  1095. label="数据类型"
  1096. width="120"
  1097. >
  1098. </el-table-column>
  1099. <el-table-column align="center" prop="eLength" label="长度" width="120">
  1100. </el-table-column>
  1101. <el-table-column
  1102. align="center"
  1103. prop="eAllowDeviation"
  1104. label="允许偏差值"
  1105. >
  1106. </el-table-column>
  1107. <el-table-column
  1108. align="center"
  1109. prop="eInspectionMethod"
  1110. label="检查方法和频率"
  1111. >
  1112. </el-table-column>
  1113. </el-table>
  1114. <span slot="footer" class="dialog-footer">
  1115. <el-button @click="importVisible = false">取 消</el-button>
  1116. <el-button type="primary" @click="importHandle">确 定</el-button>
  1117. </span>
  1118. </el-dialog>
  1119. <!-- 编辑元素 -->
  1120. <el-dialog
  1121. :title="(curEleTable.tableName ? curEleTable.tableName : '') + ''"
  1122. :visible.sync="editEleVisible"
  1123. width="80%"
  1124. append-to-body
  1125. :close-on-click-modal="false"
  1126. >
  1127. <!-- <p class="font-c-warning">编辑元素信息(请谨慎操作)</p> -->
  1128. <el-table :data="editEleList" border style="width: 100%" height="400px">
  1129. <el-table-column
  1130. align="center"
  1131. type="index"
  1132. width="50"
  1133. ></el-table-column>
  1134. <el-table-column align="center" prop="eName" label="字段信息">
  1135. </el-table-column>
  1136. <el-table-column
  1137. align="center"
  1138. prop="eType"
  1139. label="数据类型"
  1140. width="120"
  1141. :formatter="eTypeFormatter"
  1142. >
  1143. </el-table-column>
  1144. <el-table-column align="center" prop="eLength" label="长度" width="120">
  1145. </el-table-column>
  1146. <el-table-column
  1147. align="center"
  1148. prop="eAllowDeviation"
  1149. label="允许偏差值"
  1150. >
  1151. </el-table-column>
  1152. <el-table-column
  1153. align="center"
  1154. prop="eInspectionMethod"
  1155. label="检查方法和频率"
  1156. >
  1157. </el-table-column>
  1158. </el-table>
  1159. <span slot="footer" class="dialog-footer">
  1160. <el-button @click="editEleVisible = false">取 消</el-button>
  1161. <!-- <el-button
  1162. type="primary"
  1163. @click="saveEles"
  1164. >确 定</el-button> -->
  1165. </span>
  1166. </el-dialog>
  1167. <!-- 元素公式 -->
  1168. <el-dialog
  1169. title="元素公式.."
  1170. :visible.sync="editEleFormulaVisible"
  1171. width="800px"
  1172. append-to-body
  1173. :close-on-click-modal="false"
  1174. >
  1175. <div class="flex mg-b-10">
  1176. <el-input
  1177. v-model="formulaInput"
  1178. placeholder="请输入名称"
  1179. size="samll"
  1180. clearable
  1181. @clear="searchFormulaName"
  1182. ></el-input>
  1183. <el-button type="info" class="mg-l-10" @click="searchFormulaName"
  1184. >搜索</el-button
  1185. >
  1186. </div>
  1187. <el-table
  1188. :data="editEleListFilter"
  1189. border
  1190. style="width: 100%"
  1191. height="400px"
  1192. >
  1193. <el-table-column align="center" prop="eName" label="字段信息">
  1194. </el-table-column>
  1195. <el-table-column align="center" label="操作" width="200">
  1196. <template slot-scope="scope">
  1197. <el-link
  1198. :type="scope.row.globalFormula == 1 ? 'warning' : 'primary'"
  1199. @click="toFormulaEdit(scope.row,10)"
  1200. >全局公式</el-link
  1201. >
  1202. <el-link
  1203. class="mg-l-10"
  1204. :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
  1205. @click="toFormulaEdit(scope.row,20)"
  1206. >节点公式</el-link
  1207. >
  1208. <!-- <el-link
  1209. class="mg-l-10"
  1210. type="danger"
  1211. @click="delEleRowHandle(scope.$index,editEleListFilter)"
  1212. >删除</el-link> -->
  1213. </template>
  1214. </el-table-column>
  1215. </el-table>
  1216. </el-dialog>
  1217. <!-- 导入划分 -->
  1218. <el-dialog
  1219. title="导入划分"
  1220. :visible.sync="importTemplateVisible"
  1221. width="800px"
  1222. append-to-body
  1223. :close-on-click-modal="false"
  1224. >
  1225. <div v-loading="importLoading">
  1226. <div>
  1227. <el-link type="primary" @click="handleDownload">下载导入模版</el-link>
  1228. </div>
  1229. <div class="mg-t-20">
  1230. <el-button type="primary" @click="fileClick">选择文件</el-button>
  1231. <span v-if="upFile" class="mg-l-20">{{ upFile.name }}</span>
  1232. <input
  1233. @change="fileChange"
  1234. type="file"
  1235. hidden
  1236. ref="file"
  1237. accept=".xls, .xlsx"
  1238. />
  1239. </div>
  1240. <div v-if="!upFile">当前还未选择文件,请选择需要导入的文件</div>
  1241. </div>
  1242. <span slot="footer" class="dialog-footer">
  1243. <el-button @click="importTemplateVisible = false">取 消</el-button>
  1244. <el-button
  1245. type="primary"
  1246. @click="importTemplateHandle"
  1247. :loading="importLoading"
  1248. >导 入</el-button
  1249. >
  1250. </span>
  1251. </el-dialog>
  1252. <!-- 节点参数 -->
  1253. <el-dialog
  1254. title="节点参数"
  1255. :visible.sync="nodeInfoVisible"
  1256. width="800px"
  1257. append-to-body
  1258. class="jiedian"
  1259. :close-on-click-modal="false"
  1260. :show-close="false"
  1261. >
  1262. <div>
  1263. <el-button
  1264. type="text"
  1265. icon="el-icon-s-operation"
  1266. class="right-btn"
  1267. @click="setNodeParameters()"
  1268. ></el-button>
  1269. <div class="flexEnd">
  1270. <i
  1271. class="el-icon-circle-plus marbottom10"
  1272. @click="addNodeInfoTable()"
  1273. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1274. ></i>
  1275. <i
  1276. class="el-icon-refresh-right marbottom10"
  1277. @click="refreshnfoTable()"
  1278. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1279. ></i>
  1280. </div>
  1281. <el-table :data="nodeInfoTable" border style="width: 100%" height="400" v-loading="nodeInfoTableLoad">
  1282. <el-table-column align="center" prop="name" label="参数名称">
  1283. <template slot-scope="scope">
  1284. <el-select
  1285. v-model="scope.row.k"
  1286. placeholder="请选择"
  1287. class="w-100p"
  1288. >
  1289. <el-option
  1290. v-for="item in namelist"
  1291. :key="item.k"
  1292. :label="item.name"
  1293. :value="item.k"
  1294. ></el-option>
  1295. </el-select>
  1296. </template>
  1297. </el-table-column>
  1298. <el-table-column align="center" prop="value" label="参数值设置">
  1299. <template slot-scope="scope">
  1300. <el-input v-model="scope.row.v"></el-input>
  1301. </template>
  1302. </el-table-column>
  1303. <el-table-column align="center" prop="describe" label="描述">
  1304. <template slot-scope="scope">
  1305. <el-input v-model="scope.row.remark"></el-input>
  1306. </template>
  1307. </el-table-column>
  1308. <el-table-column label="操作" width="120" align="center">
  1309. <template slot-scope="scope">
  1310. <el-button
  1311. type="text"
  1312. size="small"
  1313. class="text-icon-primary"
  1314. @click="linkEle(scope.row)"
  1315. >关联元素</el-button>
  1316. <el-button
  1317. type="text"
  1318. size="small"
  1319. class="text-icon-danger"
  1320. @click="delNodeInfoss(scope.$index,scope.row)"
  1321. >删除</el-button
  1322. >
  1323. </template>
  1324. </el-table-column>
  1325. </el-table>
  1326. </div>
  1327. <span slot="footer" class="dialog-footer">
  1328. <el-button @click="nodeInfoVisible = false">取 消</el-button>
  1329. <el-button type="primary" @click="nodeInfoSave()">保 存</el-button>
  1330. </span>
  1331. </el-dialog>
  1332. <!-- 设置参数名称 -->
  1333. <el-dialog
  1334. title="设置参数名称"
  1335. :visible.sync="infoNameVisible"
  1336. width="800px"
  1337. append-to-body
  1338. class="jiedian"
  1339. :close-on-click-modal="false"
  1340. >
  1341. <div>
  1342. <div class="flexEnd">
  1343. <i
  1344. class="el-icon-circle-plus marbottom10"
  1345. @click="setParameterName()"
  1346. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1347. ></i>
  1348. </div>
  1349. <el-table :data="namelists" border style="width: 100%" height="400">
  1350. <el-table-column align="center" prop="name" label="参数名称">
  1351. <template slot-scope="scope">
  1352. <el-input v-model="scope.row.name"></el-input>
  1353. </template>
  1354. </el-table-column>
  1355. <el-table-column align="center" prop="key" label="参数值KEY">
  1356. <template slot-scope="scope">
  1357. <el-input v-model="scope.row.k"></el-input>
  1358. </template>
  1359. </el-table-column>
  1360. <el-table-column align="center" prop="describe" label="描述">
  1361. <template slot-scope="scope">
  1362. <el-input v-model="scope.row.remark"></el-input>
  1363. </template>
  1364. </el-table-column>
  1365. <el-table-column label="操作" width="120" align="center">
  1366. <template slot-scope="scope">
  1367. <el-button
  1368. type="text"
  1369. size="small"
  1370. class="text-icon-danger"
  1371. @click="delNodeInfo(scope.$index,scope.row)"
  1372. >删除</el-button
  1373. >
  1374. </template>
  1375. </el-table-column>
  1376. </el-table>
  1377. </div>
  1378. <span slot="footer" class="dialog-footer">
  1379. <el-button @click="addParameterName()">保 存</el-button>
  1380. <el-button @click="closeParameter()">关 闭</el-button>
  1381. </span>
  1382. </el-dialog>
  1383. <el-dialog
  1384. title="别名"
  1385. :visible.sync="aliasVisible"
  1386. width="600px"
  1387. append-to-body
  1388. :close-on-click-modal="false"
  1389. >
  1390. <div>
  1391. <div class="flex">
  1392. <el-input
  1393. v-model="aliasInput"
  1394. placeholder="请输入节点别名"
  1395. ></el-input>
  1396. <el-button class="mg-l-20" type="primary" @click="addAlias"
  1397. >添加</el-button
  1398. >
  1399. </div>
  1400. <div class="flex" style="flex-wrap: wrap">
  1401. <div class="mg-t-10" v-for="(tag, index) in aliasArr" :key="index">
  1402. <el-tag closable @close="delAlias(index)">
  1403. {{ tag }}
  1404. </el-tag>
  1405. <span v-if="index != aliasArr.length - 1">、</span>
  1406. </div>
  1407. </div>
  1408. </div>
  1409. <span slot="footer" class="dialog-footer">
  1410. <el-button @click="aliasVisible = false">取 消</el-button>
  1411. <el-button type="primary" @click="saveAliasHandle">确 定</el-button>
  1412. </span>
  1413. </el-dialog>
  1414. <!-- 节点公式 -->
  1415. <el-dialog
  1416. title="元素公式2"
  1417. :visible.sync="formulaCompVisible"
  1418. fullscreen
  1419. append-to-body
  1420. class="full-dialog"
  1421. @close="closeformulaComp"
  1422. >
  1423. <FormulaEdit
  1424. :fromcurNode="curTreeData"
  1425. :projectid="projectid"
  1426. :wbsid="id"
  1427. :nodeid="curTreeData.id"
  1428. :eleid="formulaCurRow.id"
  1429. :globaltype="formulaCurRow.globaltype"
  1430. @hideDialog="formulaCompVisible = false"
  1431. v-if="formulaCompVisible"
  1432. ></FormulaEdit>
  1433. </el-dialog>
  1434. <!-- 全局公式 -->
  1435. <el-dialog title="" :visible.sync="formulaCompVisible1" fullscreen append-to-body class="full-dialog" @close="closeformulaComp1">
  1436. <FormulaEditone :wbsid="id" :nodeid="curTreeData.id" :eleid="formulaCurRow.id" :elementType="formulaCurRow.elementType" :projectid="projectid" :tableType="istableType"
  1437. :globaltype="formulaCurRow.globaltype" @hideDialog="formulaCompVisible1 = false" :fromcurNode="curEleTable"
  1438. v-if="formulaCompVisible1">
  1439. </FormulaEditone>
  1440. </el-dialog>
  1441. <!-- 编辑元素 -->
  1442. <el-dialog
  1443. title=" "
  1444. :visible.sync="editElementVisible"
  1445. fullscreen
  1446. append-to-body
  1447. class="full-dialog"
  1448. >
  1449. <EditElement
  1450. :editElementQuery="curTreeData"
  1451. :pkeyId="editElementQuery.pkeyId"
  1452. :excelId="editElementQuery.excelId"
  1453. :id="editElementQuery.id"
  1454. :initTableName="editElementQuery.initTableName"
  1455. :pid="editElementQuery.pid"
  1456. :wbsid="editElementQuery.wbsid"
  1457. :initTableId="editElementQuery.initTableId"
  1458. :nodeid="editElementQuery.nodeid"
  1459. @hideDialog="editElementVisible = false"
  1460. v-if="editElementVisible"
  1461. ></EditElement>
  1462. </el-dialog>
  1463. <el-dialog
  1464. title="节点参数设置-关联元素"
  1465. :visible.sync="linkEleVisible"
  1466. width="800px"
  1467. append-to-body
  1468. class="jiedian"
  1469. :close-on-click-modal="false"
  1470. >
  1471. <div>
  1472. <el-table
  1473. :data="linkEleTableList"
  1474. border
  1475. style="width: 100%"
  1476. height="400"
  1477. >
  1478. <el-table-column
  1479. align="center"
  1480. prop="tableName"
  1481. label="元素表名"
  1482. >
  1483. </el-table-column>
  1484. <el-table-column
  1485. align="center"
  1486. prop="elementName"
  1487. label="关联元素字段"
  1488. >
  1489. </el-table-column>
  1490. <el-table-column
  1491. label="操作"
  1492. width="160"
  1493. align="center"
  1494. >
  1495. <template slot-scope="scope">
  1496. <el-button v-if="!scope.row.mappingId"
  1497. type="text"
  1498. size="small"
  1499. class="text-icon-primary"
  1500. @click="tolinkEle(scope.row)"
  1501. >选择元素</el-button>
  1502. <el-button v-if="!!scope.row.mappingId"
  1503. type="text"
  1504. size="small"
  1505. class="text-icon-danger"
  1506. @click="delLink(scope.row)"
  1507. >删除关联</el-button>
  1508. </template>
  1509. </el-table-column>
  1510. </el-table>
  1511. </div>
  1512. <span
  1513. slot="footer"
  1514. class="dialog-footer"
  1515. >
  1516. <!-- <el-button @click="saveLinks">保 存</el-button> -->
  1517. <el-button @click="linkEleVisible = false">关 闭</el-button>
  1518. </span>
  1519. </el-dialog>
  1520. <el-dialog
  1521. title="选择关联元素"
  1522. :visible.sync="linkCheckVisible"
  1523. width="600px"
  1524. append-to-body
  1525. class="jiedian"
  1526. :close-on-click-modal="false"
  1527. >
  1528. <div>
  1529. <div class="flex mg-b-20">
  1530. <el-input v-model="linkEleKey" placeholder="请输入元素关键字搜索"></el-input>
  1531. <el-link class="mg-l-20" :underline="false">
  1532. <i class="el-icon-search" style="font-size:20px" @click="searchEle"></i>
  1533. </el-link>
  1534. </div>
  1535. <el-table
  1536. :data="linkEleList"
  1537. border
  1538. style="width: 100%"
  1539. height="400"
  1540. >
  1541. <el-table-column
  1542. align="center"
  1543. prop="eName"
  1544. label="元素名"
  1545. >
  1546. </el-table-column>
  1547. <el-table-column
  1548. label="操作"
  1549. width="55">
  1550. <template slot-scope="scope">
  1551. <el-checkbox v-model="scope.row.checked" @change="value => linkEleCheck(value,scope.$index)"></el-checkbox>
  1552. </template>
  1553. </el-table-column>
  1554. </el-table>
  1555. </div>
  1556. <span
  1557. slot="footer"
  1558. class="dialog-footer"
  1559. >
  1560. <el-button @click="saveLinkEle">保 存</el-button>
  1561. <el-button @click="linkCheckVisible = false">关 闭</el-button>
  1562. </span>
  1563. </el-dialog>
  1564. </div>
  1565. </template>
  1566. <script>
  1567. import ManualSorting from "@/components/WbsTree/ManualSorting";
  1568. import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
  1569. import FormulaEdit from "@/views/formula/edit.vue";
  1570. import FormulaEditone from '@/views/formula/edit1.vue'
  1571. import EditElement from "@/views/manager/projectinfo/editElement/editElement.vue";
  1572. import {
  1573. saveFormAndElement,
  1574. selectFormElements,
  1575. importWbsTree,
  1576. findWbsTreePrivateSameLevel,
  1577. wbsTreePrivateSort,
  1578. parameters,
  1579. saveOrUpdateBatch,
  1580. keymap,
  1581. updateBatchNodeTableInfo2,
  1582. updateStatus,
  1583. getParamElements,
  1584. specifiedParamElements,
  1585. delParamElements, selectPrivateFormElements
  1586. } from "@/api/manager/wbstree";
  1587. import {
  1588. saveElement,
  1589. remove as removeElement,
  1590. updateBatchElements,
  1591. getTemplate,
  1592. importWbsElement,
  1593. } from "@/api/manager/wbsformelement";
  1594. import {
  1595. getLazytree,
  1596. getDetail,
  1597. update,
  1598. findNodeTableByCondition as selectByNodeTable,
  1599. removeTableByCondition as removeTableById,
  1600. removePrivateTreeNode,
  1601. wbsTreePrivateTableSort,
  1602. privateSubmitFullName,
  1603. syncNodeParam,
  1604. syncNodeTable,
  1605. syncNodeinfo,
  1606. tabTypeLazyTree,
  1607. } from "@/api/manager/wbsprivate";
  1608. import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
  1609. import {refrehPram} from "@/api/manager/wbstree"
  1610. import {getTableElments} from "@/api/manager/wbstree";
  1611. import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
  1612. import { getDictionary } from "@/api/system/dict";
  1613. import { mapGetters } from "vuex";
  1614. import {
  1615. getList,
  1616. tabLazytreeAll,
  1617. saveLinkTab,
  1618. getExcelHtml,
  1619. } from "@/api/exctab/excelmodel";
  1620. import { getStore, setStore } from "@/util/store";
  1621. import { log } from '@antv/g2plot/lib/utils';
  1622. export default {
  1623. data() {
  1624. var checkMajorDataType = (rule, value, callback) => {
  1625. //console.log(this.nodeDetail.nodeType)
  1626. //console.log(this.nodeDetail.majorDataType)
  1627. if (this.nodeDetail.nodeType == 6) {
  1628. if (!this.nodeDetail.majorDataType) {
  1629. callback(new Error("工序节点必须选择内业资料类型"));
  1630. }
  1631. }
  1632. callback();
  1633. };
  1634. return {
  1635. fromcurNode:{},
  1636. formDatass: [],
  1637. editElementFormTag: false,
  1638. editeditElementFormMFLoading:false,
  1639. jiedianId: "",
  1640. //#region
  1641. sortTag: false,
  1642. sortTag2: false,
  1643. sortArray: [],
  1644. //#endregion
  1645. //#region 关联清表
  1646. loading: false,
  1647. GLExcel: false,
  1648. GLExcelFrom: {
  1649. id: "",
  1650. name: "",
  1651. search: "", //搜素框舒服的值
  1652. ids: "",
  1653. excelId: "",
  1654. initTableName: "",
  1655. initTableId:""
  1656. },
  1657. GLExcelData: [], //
  1658. GLExcelProps: {
  1659. label: "name",
  1660. children: "children",
  1661. disabled: "hasChildren",
  1662. isLeaf: function (data) {
  1663. let tag = false;
  1664. if (!data.hasChildren) {
  1665. tag = true;
  1666. }
  1667. if (data.isExistForm == 1) {
  1668. tag = true;
  1669. }
  1670. return tag;
  1671. },
  1672. },
  1673. exceldata: [], //清表模板
  1674. GLExcelLoading: false,
  1675. //#endregion
  1676. //#region 调整表单
  1677. adjustmentExcel: "",
  1678. excelHtml: false,
  1679. //#endregion
  1680. //#region
  1681. id: "",
  1682. projectid: "",
  1683. filterText: "",
  1684. treeData: [],
  1685. treeLoad: false,
  1686. menuShow: false,
  1687. defaultProps: {
  1688. children: "children",
  1689. label: "title",
  1690. isLeaf: function (data) {
  1691. //console.log(data, !data.hasChildren, data.isExistForm);
  1692. let tag = false;
  1693. if (!data.hasChildren) {
  1694. tag = true;
  1695. }
  1696. if (data.isExistForm == 1) {
  1697. tag = true;
  1698. }
  1699. if (data.nodeType >= 6 && data.nodeType <= 13) {
  1700. tag = true;
  1701. }
  1702. //中间交工。开工报告、质量评定)
  1703. if (
  1704. data.majorDataType == 1 ||
  1705. data.majorDataType == 2 ||
  1706. data.majorDataType == 3
  1707. ) {
  1708. tag = true;
  1709. }
  1710. return tag;
  1711. // return !data.hasChildren || (data.isExistForm == 1);
  1712. },
  1713. },
  1714. leftType: 5,
  1715. curTreeData: {},
  1716. curTreeNode: {},
  1717. tableData: [],
  1718. nodeDetail: {},
  1719. formData: [],
  1720. editType: 1,
  1721. dialogVisible: false,
  1722. saveNodeLoading: false,
  1723. nodeTypelist: [],
  1724. majorDataTypeList: [],
  1725. rules: {
  1726. nodeName: [
  1727. { required: true, message: "请输入节点名称", trigger: "blur" },
  1728. ],
  1729. nodeType: [
  1730. { required: true, message: "请选择节点类型", trigger: "change" },
  1731. ],
  1732. majorDataType: [{ validator: checkMajorDataType, trigger: "change" }],
  1733. },
  1734. eleVisible: false,
  1735. tableTypelist: [],
  1736. dataTypeList: [],
  1737. ownerTypeList: [],
  1738. eleForm: {
  1739. elementList: [],
  1740. },
  1741. eleRules: {
  1742. nodeName: [
  1743. { required: true, message: "请输入表名称", trigger: "blur" },
  1744. ],
  1745. tableType: [
  1746. { required: true, message: "请选择表类型", trigger: "change" },
  1747. ],
  1748. tableOwner: [
  1749. { required: true, message: "请选择所属方", trigger: "change" },
  1750. ],
  1751. },
  1752. importVisible: false,
  1753. tempList: [],
  1754. curEleTable: {},
  1755. istableType:true,
  1756. editEleVisible: false,
  1757. editEleList: [],
  1758. eleReg: /(≥|≤|±|【】)?([^≥≤±【】]*)/,
  1759. editEleFormulaVisible: false,
  1760. formulaInput: "",
  1761. editEleListFilter: [],
  1762. editEleListAll: [],
  1763. importTemplateVisible: false,
  1764. fileUrl: "",
  1765. upFile: null,
  1766. importLoading: false,
  1767. nodeInfoVisible: false,
  1768. nodeInfoTable: [],
  1769. nodeInfoTableLoad:false,
  1770. namelist: [],
  1771. namelists: [],
  1772. delids:[],
  1773. infoNameVisible: false,
  1774. excelSortTag: false,
  1775. excelSortTag2: false,
  1776. tableSortList: [],
  1777. //#endregion
  1778. defaultExpandedKeys: [],
  1779. expandName: this.$route.fullPath,
  1780. aliasVisible: false, //别名
  1781. aliasInput: "",
  1782. aliasArr: [],
  1783. formulaCompVisible: false, //公式弹框
  1784. formulaCompVisible1:false,
  1785. formulaCurRow: {}, //当前元素
  1786. editElementVisible: false, //编辑元素弹框
  1787. editElementQuery: {
  1788. pkeyId: "",
  1789. excelId: "",
  1790. id: "",
  1791. initTableName: "",
  1792. initTableId:"",
  1793. pid: "",
  1794. wbsid: "",
  1795. nodeid: ""
  1796. }, //传参
  1797. syncBtnLoad: false,
  1798. showType: 1,
  1799. typeTreeData: [],
  1800. testTreeLoad: false,
  1801. testTreeData: [],
  1802. mixRatioTestIds: [],
  1803. //节点参数,关联元素
  1804. curParam:{},//当前节点参数
  1805. linkEleVisible:false,
  1806. linkEleTableList:[],//元素表数组
  1807. curLinkEleTable:{},//当前元素表
  1808. linkCheckVisible:false,//关联弹框
  1809. linkEleList:[],//元素数组
  1810. linkEleKey:'',//搜索关键字
  1811. };
  1812. },
  1813. computed: {
  1814. ...mapGetters(["userInfo"]),
  1815. dialogTitle: function () {
  1816. let text = "节点";
  1817. if (this.leftType == 1) {
  1818. text = "新增" + text;
  1819. } else if (this.leftType == 2) {
  1820. text = "编辑" + text;
  1821. }
  1822. return text;
  1823. },
  1824. },
  1825. created() {
  1826. this.init();
  1827. //console.log(this.userInfo)
  1828. },
  1829. methods: {
  1830. //#region
  1831. init() {
  1832. //this.id = this.$route.query.wbsid;
  1833. //this.projectid = this.$route.query.pid;
  1834. const { wbsid, pid, type } = this.$route.query;
  1835. this.id = wbsid;
  1836. this.projectid = pid;
  1837. this.wbsType = type ? Number(type) : 1;
  1838. this.getNodeTypelist();
  1839. this.getTableTypelist();
  1840. this.getDataTypelist();
  1841. this.getOwnerTypelist();
  1842. this.defaultExpandedKeys = getStore({ name: this.expandName });
  1843. },
  1844. loadNode(node, resolve) {
  1845. let pid = 0;
  1846. if (node.level != 0) {
  1847. pid = node.data.id;
  1848. }
  1849. const type = this.wbsType;
  1850. getLazytree(this.id, pid, this.userInfo.tenant_id, this.projectid, {
  1851. wbsType: type,
  1852. }).then((res) => {
  1853. let arr = [];
  1854. if (Array.isArray(res.data.data)) {
  1855. arr = res.data.data;
  1856. }
  1857. return resolve(arr);
  1858. });
  1859. },
  1860. getNodeDetail(data, node) {
  1861. console.log('getNodeDetail',data);
  1862. let parentName = "";
  1863. if (node.parent.data) {
  1864. parentName = node.parent.data.title;
  1865. }
  1866. this.curTreeData = data;
  1867. this.curTreeNode = node;
  1868. this.curTreeData.parentName = parentName;
  1869. getDetail(data.id, this.id, this.projectid).then((res) => {
  1870. res.data.data.parentName = parentName;
  1871. this.tableData = [res.data.data];
  1872. this.nodeDetail = Object.assign({}, res.data.data);
  1873. });
  1874. this.updateNodeTable();
  1875. //获取节点展开路径
  1876. this.getExpandedKeys(node);
  1877. },
  1878. saveNode() {
  1879. const type = this.wbsType;
  1880. this.$refs["nodeDetail"].validate((valid) => {
  1881. if (valid) {
  1882. const { mixRatioTestIds, nodeType } = this.nodeDetail;
  1883. if (type === 2 && nodeType === 53) {
  1884. if (mixRatioTestIds) {
  1885. if (this.editType == 1) {
  1886. this.addNode();
  1887. } else if (this.editType == 2) {
  1888. this.updateNode();
  1889. }
  1890. } else {
  1891. this.$message({
  1892. type: "error",
  1893. message: "请先选择节点",
  1894. });
  1895. return false;
  1896. }
  1897. } else {
  1898. if (this.editType == 1) {
  1899. this.addNode();
  1900. } else if (this.editType == 2) {
  1901. this.updateNode();
  1902. }
  1903. }
  1904. } else {
  1905. console.log("error submit!!");
  1906. return false;
  1907. }
  1908. });
  1909. },
  1910. addNode() {
  1911. this.saveNodeLoading = true;
  1912. update(this.nodeDetail).then(() => {
  1913. this.updateTreeNewNode();
  1914. this.dialogVisible = false;
  1915. this.$message({
  1916. type: "success",
  1917. message: "新增成功!",
  1918. });
  1919. });
  1920. },
  1921. updateNode() {
  1922. update(this.nodeDetail).then(() => {
  1923. let node = this.tableData[0];
  1924. node.nodeName = this.nodeDetail.nodeName;
  1925. node.nodeType = this.nodeDetail.nodeType;
  1926. this.curTreeData.title = this.nodeDetail.nodeName;
  1927. this.dialogVisible = false;
  1928. this.$message({
  1929. type: "success",
  1930. message: "修改成功!",
  1931. });
  1932. });
  1933. },
  1934. toSplit(val) {
  1935. return val ? String(val).split(",") : "";
  1936. },
  1937. setLeftType(type, data, node) {
  1938. this.jiedianId = data.id;
  1939. if (type == 4 || type == 5) {
  1940. this.leftType = type;
  1941. }
  1942. this.curTreeData = data;
  1943. this.curTreeNode = node;
  1944. this.$refs.tree.setCurrentKey(data.id);
  1945. if (type == 1 || type == 2) {
  1946. this.getMajorDataTypeList();
  1947. this.dialogVisible = true;
  1948. this.editType = type;
  1949. }
  1950. getDetail(data.id, this.id, this.projectid).then((res) => {
  1951. let parentName = "";
  1952. if (node.parent.data) {
  1953. parentName = node.parent.data.title;
  1954. }
  1955. res.data.data.parentName = parentName;
  1956. this.tableData = [res.data.data];
  1957. if (type == 1) {
  1958. this.nodeDetail = {
  1959. parentId: res.data.data.id,
  1960. parentName: parentName,
  1961. projectId: res.data.data.projectId,
  1962. };
  1963. } else {
  1964. this.nodeDetail = Object.assign({}, res.data.data);
  1965. this.mixRatioTestIds = this.toSplit(res.data.data.mixRatioTestIds);
  1966. }
  1967. this.nodeDetail.type = 1; // '1'节点 '2'表单
  1968. this.nodeDetail.wbsId = this.id;
  1969. this.nodeDetail.tenantId = this.userInfo.tenant_id;
  1970. });
  1971. if (this.leftType == 4) {
  1972. selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
  1973. if (res.data.data.length) {
  1974. this.formData = res.data.data;
  1975. } else {
  1976. this.formData = [];
  1977. }
  1978. });
  1979. }
  1980. //获取节点展开路径
  1981. this.getExpandedKeys(node);
  1982. },
  1983. showFormElement() {
  1984. if (!this.nodeDetail.id) {
  1985. this.$message({
  1986. type: "warning",
  1987. message: "请先选择在哪个节点下创建表",
  1988. });
  1989. return;
  1990. }
  1991. this.eleVisible = true;
  1992. },
  1993. addEleRow(list) {
  1994. list.push({});
  1995. },
  1996. delEleRow(index, list) {
  1997. list.splice(index, 1);
  1998. },
  1999. saveFormAndElementHandle() {
  2000. this.$refs["eleDialog"].validate((valid) => {
  2001. if (valid) {
  2002. this.eleForm.wbsId = this.id;
  2003. this.eleForm.tenantId = this.userInfo.tenant_id;
  2004. this.eleForm.nodeType = -1;
  2005. this.eleForm.type = 2; // '1'节点 '2'表单
  2006. this.eleForm.parentId = this.nodeDetail.id;
  2007. this.eleForm.elementList.forEach((element) => {
  2008. element.eAllowDeviation =
  2009. (element.allow ? element.allow : "") +
  2010. (element.deviation ? element.deviation : "");
  2011. if (element.eType == 4) {
  2012. element.eLength = 0;
  2013. }
  2014. });
  2015. saveFormAndElement(this.eleForm).then(() => {
  2016. //console.log(res)
  2017. this.updateTreeNewNode();
  2018. this.updateNodeTable();
  2019. this.eleVisible = false;
  2020. this.$message({
  2021. type: "success",
  2022. message: "新增成功!",
  2023. });
  2024. });
  2025. } else {
  2026. console.log("error submit!!");
  2027. return false;
  2028. }
  2029. });
  2030. },
  2031. updateTreeNewNode() {
  2032. getLazytree(
  2033. this.id,
  2034. this.nodeDetail.parentId,
  2035. this.userInfo.tenant_id,
  2036. this.projectid
  2037. ).then((res) => {
  2038. this.$refs.tree.updateKeyChildren(
  2039. this.nodeDetail.parentId,
  2040. res.data.data
  2041. );
  2042. });
  2043. },
  2044. updateNodeTable() {
  2045. selectByNodeTable(this.curTreeData.id, this.projectid, this.id).then(
  2046. (res) => {
  2047. if (res.data.data.length) {
  2048. this.formData = res.data.data;
  2049. } else {
  2050. this.formData = [];
  2051. }
  2052. }
  2053. );
  2054. },
  2055. deleNode(data, node) {
  2056. this.$confirm(
  2057. "此操作将删除节点【" + data.title + "】, 是否继续?",
  2058. "提示",
  2059. {
  2060. confirmButtonText: "确定",
  2061. cancelButtonText: "取消",
  2062. type: "warning",
  2063. }
  2064. )
  2065. .then(() => {
  2066. removePrivateTreeNode(data.primaryKeyId).then(() => {
  2067. this.$refs.tree.remove(node);
  2068. this.$message({
  2069. type: "success",
  2070. message: "删除成功!",
  2071. });
  2072. });
  2073. })
  2074. .catch(() => {});
  2075. },
  2076. importHandle() {},
  2077. handleEdit(index, row) {
  2078. this.curEleTable = row;
  2079. selectPrivateFormElements(this.curEleTable.initTableId).then((res) => {
  2080. res.data.data.forEach((element) => {
  2081. this.eleReg.exec(element.eAllowDeviation);
  2082. element.allow = RegExp.$1 ? RegExp.$1 : "";
  2083. element.deviation = RegExp.$2 ? RegExp.$2 : "";
  2084. });
  2085. this.editEleList = res.data.data;
  2086. });
  2087. this.editEleVisible = true;
  2088. },
  2089. handleDelete(index, row) {
  2090. this.$confirm("是否删除 " + row.tableName + " ?", "删除元素表", {
  2091. distinguishCancelAndClose: true,
  2092. confirmButtonText: "删除",
  2093. cancelButtonText: "取消",
  2094. }).then(() => {
  2095. removeTableById(row.id, this.projectid, this.id).then(() => {
  2096. this.formData.splice(index, 1);
  2097. this.$message({
  2098. type: "success",
  2099. message: "删除成功!",
  2100. });
  2101. });
  2102. });
  2103. },
  2104. async hideMD(row) {
  2105. //隐藏按钮
  2106. const code = await this.updateStatus(row.pkeyId, row.status);
  2107. if (code == 200) {
  2108. if (row.status == 0) {
  2109. row.status = 1;
  2110. } else {
  2111. row.status = 0;
  2112. }
  2113. }
  2114. },
  2115. async updateStatus(pKeyId, status) {
  2116. //隐藏功能激活
  2117. const { data: res } = await updateStatus({ pKeyId });
  2118. if (res.code == 200) {
  2119. this.$message({
  2120. type: "success",
  2121. message: status == 1 ? "隐藏成功" : "激活成功",
  2122. });
  2123. }
  2124. return res.code;
  2125. },
  2126. handleEditFormula(index, row) {
  2127. this.curEleTable = row;
  2128. selectFormElements(this.curEleTable.pkeyId,{type:0}).then((res) => {
  2129. this.editEleListFilter = res.data.data;
  2130. this.editEleListAll = [].concat(this.editEleListFilter);
  2131. });
  2132. this.editEleFormulaVisible = true;
  2133. },
  2134. //搜索 筛选
  2135. searchFormulaName() {
  2136. this.editEleListFilter = this.editEleListAll.filter((ele) => {
  2137. return ele.eName.indexOf(this.formulaInput) > -1;
  2138. });
  2139. },
  2140. saveNewEle(row) {
  2141. row.eAllowDeviation =
  2142. (row.allow ? row.allow : "") + (row.deviation ? row.deviation : "");
  2143. row.fId = this.curEleTable.initTableId;
  2144. row.initTableName = this.curEleTable.initTableName;
  2145. if (row.eType == 4) {
  2146. row.eLength = 0;
  2147. }
  2148. saveElement(row).then((res) => {
  2149. if (res.data.data) {
  2150. this.$set(row, "id", res.data.data.id);
  2151. this.$set(row, "ekey", res.data.data.ekey);
  2152. this.$message({
  2153. type: "success",
  2154. message: "保存成功!",
  2155. });
  2156. }
  2157. });
  2158. },
  2159. delEleRowHandle(index, list) {
  2160. let row = list[index];
  2161. if (row.id) {
  2162. //有id需要请求删除
  2163. this.$confirm("是否确认删除?", "删除元素", {
  2164. distinguishCancelAndClose: true,
  2165. confirmButtonText: "删除",
  2166. cancelButtonText: "取消",
  2167. }).then(() => {
  2168. removeElement(row.id, this.curEleTable.initTableName, row.ekey).then(
  2169. () => {
  2170. list.splice(index, 1);
  2171. }
  2172. );
  2173. });
  2174. } else {
  2175. list.splice(index, 1);
  2176. }
  2177. },
  2178. saveEles() {
  2179. for (let i = 0; i < this.editEleList.length; i++) {
  2180. if (!this.editEleList[i].id) {
  2181. this.$message({
  2182. type: "warning",
  2183. message: "请先将新增的元素点击保存",
  2184. });
  2185. return;
  2186. }
  2187. }
  2188. if (this.editEleList.length > 0) {
  2189. this.editEleList.forEach((element) => {
  2190. element.eAllowDeviation =
  2191. (element.allow ? element.allow : "") +
  2192. (element.deviation ? element.deviation : "");
  2193. if (element.eType == 4) {
  2194. element.eLength = 0;
  2195. }
  2196. });
  2197. updateBatchElements(
  2198. this.editEleList,
  2199. this.curEleTable.initTableName
  2200. ).then(() => {
  2201. this.editEleVisible = false;
  2202. this.updateNodeTable();
  2203. this.$message({
  2204. type: "success",
  2205. message: "保存成功!",
  2206. });
  2207. });
  2208. } else {
  2209. this.editEleVisible = false;
  2210. this.updateNodeTable();
  2211. this.$message({
  2212. type: "success",
  2213. message: "保存成功!",
  2214. });
  2215. }
  2216. },
  2217. nodeTypeChange(val) {
  2218. if (val === 53) {
  2219. if (this.testTreeData.length > 0) {
  2220. return;
  2221. }
  2222. this.testTreeLoad = true;
  2223. getAlltree(this.projectid, this.id).then((res) => {
  2224. this.testTreeLoad = false;
  2225. this.testTreeData = res.data.data;
  2226. });
  2227. }
  2228. },
  2229. //根据逗号联合
  2230. toJoin(arr) {
  2231. return arr ? arr.join() : "";
  2232. },
  2233. TestTreeCheckChange(_, { checkedKeys, halfCheckedKeys }) {
  2234. // const newarr = [...checkedKeys, ...halfCheckedKeys];
  2235. const newarr = [...checkedKeys]
  2236. this.nodeDetail.mixRatioTestIds = this.toJoin(newarr);
  2237. },
  2238. filterChange() {
  2239. if (this.treeData.length > 0) {
  2240. this.$refs.treeall.filter(this.filterText);
  2241. return;
  2242. }
  2243. this.treeLoad = true;
  2244. getAlltree(this.projectid, this.id).then((res) => {
  2245. this.treeLoad = false;
  2246. this.treeData = res.data.data;
  2247. this.$nextTick(() => {
  2248. this.$refs.treeall.filter(this.filterText);
  2249. });
  2250. });
  2251. },
  2252. importTemplate(data) {
  2253. this.importTemplateVisible = true;
  2254. this.curTreeData = data;
  2255. if (!this.fileUrl) {
  2256. getAttchFromOriginalName(1, 20, {
  2257. originalName: "WBS划分模板.xls",
  2258. }).then((res) => {
  2259. if (res.data.data.records.length) {
  2260. this.fileUrl = res.data.data.records[0].link;
  2261. } else {
  2262. this.fileUrl = "";
  2263. }
  2264. });
  2265. }
  2266. },
  2267. importTemplateHandle() {
  2268. if (!this.upFile) {
  2269. this.$message({
  2270. type: "warning",
  2271. message: "请先选择文件再进行导入",
  2272. });
  2273. return;
  2274. }
  2275. let forms = new FormData();
  2276. forms.append("excelFile", this.upFile);
  2277. let wbsTreeFu = {
  2278. wbsId: this.id,
  2279. parentId: this.curTreeData.id,
  2280. // ancestors:'0,'+this.curTreeData.id,
  2281. };
  2282. let json = JSON.stringify(wbsTreeFu);
  2283. let blob = new Blob([json], { type: "application/json" });
  2284. forms.append("wbsTreeFu", blob);
  2285. this.importLoading = true;
  2286. importWbsTree(forms)
  2287. .then(() => {
  2288. //this.$router.go(0)
  2289. let node = this.$refs.tree.getNode(this.curTreeData.id);
  2290. node.isLeaf = false;
  2291. this.importTemplateVisible = false;
  2292. this.upFile = null;
  2293. })
  2294. .finally(() => {
  2295. this.importLoading = false;
  2296. });
  2297. },
  2298. handleDownload() {
  2299. if (this.fileUrl) {
  2300. window.open(this.fileUrl);
  2301. } else {
  2302. this.$message({
  2303. type: "warning",
  2304. message: "请先在附件管理上传【WBS划分模板.xls】文件",
  2305. });
  2306. }
  2307. },
  2308. fileClick() {
  2309. this.$refs.file.click();
  2310. },
  2311. fileChange(e) {
  2312. const file = e.target.files[0];
  2313. if (!file) {
  2314. // 如果用户没有选择图片,只是点了文件上传这个按钮
  2315. return;
  2316. }
  2317. //console.log(file)
  2318. this.upFile = file;
  2319. },
  2320. editNodeInfo(index, row) {
  2321. this.$set(row, "isEdit", true);
  2322. },
  2323. saveNodeInfoHandle(index, row) {
  2324. row.isEdit = false;
  2325. },
  2326. downloadTmp() {
  2327. getTemplate().then((res) => {
  2328. //console.log(res)
  2329. let blob = new Blob([res.data], {
  2330. type: "application/vnd.ms-excel",
  2331. });
  2332. //console.log(blob)
  2333. let filename = Date.parse(new Date()) + ".xls";
  2334. if (window.navigator.msSaveOrOpenBlob) {
  2335. // 兼容IE10
  2336. window.navigator.msSaveBlob(blob, filename);
  2337. } else {
  2338. // 兼容chrome/firefox
  2339. let aTag = document.createElement("a");
  2340. aTag.download = Date.parse(new Date()) + ".xls";
  2341. aTag.href = window.URL.createObjectURL(blob);
  2342. aTag.click();
  2343. URL.revokeObjectURL(aTag.href);
  2344. }
  2345. });
  2346. },
  2347. fileClick2() {
  2348. this.$refs.file2.click();
  2349. },
  2350. tmpImport(e) {
  2351. const file = e.target.files[0];
  2352. const formData = new FormData();
  2353. formData.append("file", file);
  2354. //console.log(file.name)
  2355. importWbsElement(formData)
  2356. .then((res) => {
  2357. res.data.data.forEach((element) => {
  2358. element.eName = element.elementName;
  2359. element.eLength = element.elementLength;
  2360. element.eType = Number(element.elementType);
  2361. element.eAllowDeviation = element.elementAllowDeviation;
  2362. element.eInspectionMethod = element.elementInspectionMethod;
  2363. this.eleReg.exec(element.eAllowDeviation);
  2364. // console.log(RegExp.$1)
  2365. // console.log(RegExp.$2)
  2366. element.allow = RegExp.$1 ? RegExp.$1 : "";
  2367. element.deviation = RegExp.$2 ? RegExp.$2 : "";
  2368. });
  2369. this.eleForm.elementList = res.data.data;
  2370. this.importVisible = false;
  2371. })
  2372. .finally(() => {
  2373. e.target.value = "";
  2374. });
  2375. },
  2376. visiblechange(value, data) {
  2377. this.$set(data, "moreShow", value);
  2378. },
  2379. bianhua2() {
  2380. this.excelSortTag2 = false;
  2381. this.$nextTick(() => {
  2382. this.excelSortTag2 = true;
  2383. });
  2384. },
  2385. //私有树的元素表修改排序
  2386. privateTableSort() {
  2387. if (!this.curTreeData.id) {
  2388. this.$message({
  2389. type: "warning",
  2390. message: "请先选择需要排序的节点",
  2391. });
  2392. return;
  2393. }
  2394. this.tableSortList = this.formData.map((form, index) => {
  2395. return {
  2396. sort: index + 1,
  2397. nodeName: form.tableName,
  2398. pkeyId: form.pkeyId,
  2399. };
  2400. });
  2401. this.excelSortTag = true;
  2402. this.excelSortTag2 = true;
  2403. },
  2404. editPrivateSort() {
  2405. wbsTreePrivateTableSort(this.tableSortList).then(() => {
  2406. this.updateNodeTable();
  2407. this.$message({
  2408. type: "success",
  2409. message: "排序成功!",
  2410. });
  2411. this.excelSortTag = false;
  2412. this.excelSortTag2 = false;
  2413. });
  2414. },
  2415. //解析元素数据类型
  2416. eTypeFormatter(row) {
  2417. let text = "";
  2418. for (let i = 0; i < this.dataTypeList.length; i++) {
  2419. if (this.dataTypeList[i].dictKey == row.eType) {
  2420. text = this.dataTypeList[i].dictValue;
  2421. break;
  2422. }
  2423. }
  2424. return text;
  2425. },
  2426. //跳转到公式配置页面
  2427. toFormulaEdit(row,type) {
  2428. // this.$router.push({
  2429. // path: '/formula/edit',
  2430. // query: {
  2431. // wbsid: this.id,
  2432. // eleid: row.id,
  2433. // nodeid:this.curTreeData.id,
  2434. // projectid:this.projectid
  2435. // }
  2436. // });
  2437. this.formulaCurRow = row;
  2438. this.formulaCurRow.globaltype = type;
  2439. if(type===10){
  2440. this.formulaCompVisible1 = true;
  2441. this.formulaCurRow.elementType = false;
  2442. this.istableType=true;
  2443. }else{
  2444. this.formulaCompVisible = true;
  2445. }
  2446. },
  2447. //关闭公式弹窗
  2448. closeformulaComp(){
  2449. console.log('关闭');
  2450. selectFormElements( this.curEleTable.pkeyId,{type:0}).then((res) => {
  2451. this.editEleListFilter = res.data.data;
  2452. this.editEleListAll = [].concat(this.editEleListFilter);
  2453. })
  2454. },
  2455. //关闭公式弹窗
  2456. closeformulaComp1(){
  2457. console.log('关闭');
  2458. selectFormElements( this.curEleTable.pkeyId,{type:0}).then((res) => {
  2459. this.editEleListFilter = res.data.data;
  2460. this.editEleListAll = [].concat(this.editEleListFilter);
  2461. })
  2462. },
  2463. getNodeTypelist() {
  2464. const type = this.wbsType;
  2465. if (this.nodeTypelist.length > 1) {
  2466. return;
  2467. }
  2468. getDictionary({
  2469. code: type === 2 ? "trial_node_type" : "wbs_node_type",
  2470. }).then((res) => {
  2471. res.data.data.forEach((element) => {
  2472. element.dictKey = Number(element.dictKey);
  2473. });
  2474. this.nodeTypelist = res.data.data;
  2475. });
  2476. },
  2477. getMajorDataTypeList() {
  2478. if (this.majorDataTypeList.length > 1) {
  2479. return;
  2480. }
  2481. getDictionary({
  2482. code: "major_data_type",
  2483. }).then((res) => {
  2484. res.data.data.forEach((element) => {
  2485. element.dictKey = Number(element.dictKey);
  2486. });
  2487. this.majorDataTypeList = res.data.data;
  2488. });
  2489. },
  2490. getTableTypelist() {
  2491. const type = this.wbsType
  2492. if (this.tableTypelist.length > 1) {
  2493. return;
  2494. }
  2495. getDictionary({
  2496. // code: "table_type",
  2497. code: type === 2 ? "trial_table_type" : "table_type",
  2498. }).then((res) => {
  2499. res.data.data.forEach((element) => {
  2500. element.dictKey = Number(element.dictKey);
  2501. });
  2502. this.tableTypelist = res.data.data;
  2503. });
  2504. },
  2505. getDataTypelist() {
  2506. if (this.dataTypeList.length > 1) {
  2507. return;
  2508. }
  2509. getDictionary({
  2510. code: "data_type",
  2511. }).then((res) => {
  2512. res.data.data.forEach((element) => {
  2513. element.dictKey = Number(element.dictKey);
  2514. });
  2515. this.dataTypeList = res.data.data;
  2516. });
  2517. },
  2518. getOwnerTypelist() {
  2519. if (this.ownerTypeList.length > 1) {
  2520. return;
  2521. }
  2522. getDictionary({
  2523. code: "owner_type",
  2524. }).then((res) => {
  2525. res.data.data.forEach((element) => {
  2526. element.dictKey = Number(element.dictKey);
  2527. });
  2528. this.ownerTypeList = res.data.data;
  2529. });
  2530. },
  2531. formatCat(row, column, cellValue) {
  2532. for (let i = 0; i < this.nodeTypelist.length; i++) {
  2533. if (this.nodeTypelist[i].dictKey == cellValue) {
  2534. return this.nodeTypelist[i].dictValue;
  2535. }
  2536. }
  2537. return cellValue;
  2538. //console.log(cellValue)
  2539. },
  2540. formatTableType(row, column, cellValue) {
  2541. for (let i = 0; i < this.tableTypelist.length; i++) {
  2542. if (this.tableTypelist[i].dictKey == cellValue) {
  2543. return this.tableTypelist[i].dictValue;
  2544. }
  2545. }
  2546. return cellValue;
  2547. //console.log(cellValue)
  2548. },
  2549. formatOwner(row, column, cellValue) {
  2550. for (let i = 0; i < this.ownerTypeList.length; i++) {
  2551. if (this.ownerTypeList[i].dictKey == cellValue) {
  2552. return this.ownerTypeList[i].dictValue;
  2553. }
  2554. }
  2555. return cellValue;
  2556. //console.log(cellValue)
  2557. },
  2558. formatdataType(row, column, cellValue) {
  2559. for (let i = 0; i < this.dataTypeList.length; i++) {
  2560. if (this.dataTypeList[i].dictKey == cellValue) {
  2561. return this.dataTypeList[i].dictValue;
  2562. }
  2563. }
  2564. return cellValue;
  2565. },
  2566. // filterNode(value, data) {
  2567. // if (!value) return true;
  2568. // return data.title.indexOf(value) !== -1;
  2569. // },
  2570. getReturnNode(node,_array,value){
  2571. let isPass = node.data && node.data.title && node.data.title.indexOf(value) !== -1;
  2572. isPass?_array.push(isPass):'';
  2573. if(!isPass && node.level!=1 && node.parent){
  2574. this.getReturnNode(node.parent,_array,value);
  2575. }
  2576. },
  2577. filterNode(value,data,node) {
  2578. if(!value){
  2579. return true;
  2580. }
  2581. let level = node.level;
  2582. let _array = [];//这里使用数组存储 只是为了存储值。
  2583. this.getReturnNode(node,_array,value);
  2584. let result = false;
  2585. _array.forEach((item)=>{
  2586. result = result || item;
  2587. });
  2588. return result;
  2589. },
  2590. //#endregion
  2591. //#region wbs私有树排序
  2592. async sortpai(data) {
  2593. console.log(data);
  2594. await this.findWbsTreePrivateSameLevel({
  2595. parentId: data.parentId,
  2596. projectId: this.projectid,
  2597. wbsId: this.id,
  2598. });
  2599. this.sortTag = true;
  2600. this.sortTag2 = true;
  2601. },
  2602. editSort() {
  2603. this.wbsTreePrivateSort();
  2604. },
  2605. bianhua() {
  2606. this.sortTag2 = false;
  2607. this.$nextTick(() => {
  2608. this.sortTag2 = true;
  2609. });
  2610. },
  2611. async wbsTreePrivateSort() {
  2612. //wbs私有树节点手动排序
  2613. const { data: res } = await wbsTreePrivateSort(this.sort);
  2614. console.log(res);
  2615. if (res.code == 200) {
  2616. this.sortTag = false;
  2617. this.sortTag2 = false;
  2618. this.getLazytreessss();
  2619. }
  2620. },
  2621. async findWbsTreePrivateSameLevel(da) {
  2622. //wbs私有树同级节点接口
  2623. const { data: res } = await findWbsTreePrivateSameLevel(da);
  2624. console.log(res);
  2625. if (res.code == 200) {
  2626. this.sort = res.data;
  2627. }
  2628. },
  2629. async getLazytreessss() {
  2630. const { data: res } = await getLazytree(
  2631. this.id,
  2632. 0,
  2633. this.userInfo.tenant_id,
  2634. this.projectid
  2635. );
  2636. console.log(res);
  2637. if (res.code == 200) {
  2638. this.treeData = res.data;
  2639. }
  2640. },
  2641. //#endregion
  2642. //#region 关联清表
  2643. async getList(da) {
  2644. //获取清表模板信息
  2645. const { data: res } = await getList(da);
  2646. console.log(res);
  2647. if (res.code === 200 && res.msg === "操作成功") {
  2648. this.GLExcelData = res.data.records;
  2649. }
  2650. },
  2651. async tabLazytreeAll() {
  2652. //清表树信息
  2653. this.GLExcelLoading = true;
  2654. const { data: res } = await tabLazytreeAll({
  2655. modeId: this.GLExcelFrom.name,
  2656. name: this.GLExcelFrom.search,
  2657. });
  2658. this.GLExcelLoading = false;
  2659. console.log(res);
  2660. if (res.code === 200 && res.msg === "操作成功") {
  2661. this.exceldata = res.data;
  2662. }
  2663. },
  2664. Associationlist(scope) {
  2665. //关联清表点击事件
  2666. console.log(scope.row);
  2667. this.GLExcel = true;
  2668. this.getList({
  2669. current: 1,
  2670. size: 100000,
  2671. parentId: 0,
  2672. });
  2673. this.GLExcelFrom.name = scope.row.modeId;
  2674. setTimeout(() => {
  2675. this.$refs.tree.setCheckedKeys([scope.row.excelId]);
  2676. }, 2000);
  2677. this.GLExcelFrom.initTableId = scope.row.initTableId;
  2678. this.GLExcelFrom.id = scope.row.pkeyId;
  2679. this.GLExcelFrom.excelId = scope.row.excelId;
  2680. this.GLExcelFrom.ids = scope.row.id;
  2681. this.GLExcelFrom.initTableName = scope.row.initTableName;
  2682. console.log(this.GLExcelFrom,'this.GLExcelFrom');
  2683. },
  2684. changetherr() {
  2685. //清表类型选择框change事件
  2686. if (this.GLExcelFrom.name != "") {
  2687. this.GLExcelFrom.search = "";
  2688. this.tabLazytreeAll();
  2689. }
  2690. },
  2691. GLExcelMD() {
  2692. //弹框关闭事件
  2693. this.GLExcelFrom.name = "";
  2694. this.GLExcelFrom.search = "";
  2695. this.GLExcelFrom.id = "";
  2696. this.exceldata = [];
  2697. this.$refs.tree.setCheckedKeys([]);
  2698. this.GLExcel = false;
  2699. },
  2700. checkchange(data) {
  2701. //节点选中回调
  2702. if (this.$refs.tree.getCheckedNodes().length === 0) {
  2703. this.$refs.tree.setCheckedKeys([]);
  2704. } else if (this.$refs.tree.getCheckedNodes().length >= 1) {
  2705. this.$refs.tree.setCheckedKeys([data.id]);
  2706. }
  2707. },
  2708. async saveLinkTab() {
  2709. //保存按钮
  2710. let checkNodes = this.$refs.tree.getCheckedNodes();
  2711. if (checkNodes.length > 0) {
  2712. let node = checkNodes[checkNodes.length - 1];
  2713. if (node.fileType != 3) {
  2714. this.$message({
  2715. type: "warning",
  2716. message: "请先上传Excel表",
  2717. });
  2718. return;
  2719. }
  2720. const { data: res } = await saveLinkTab({
  2721. exceTabId: node.id,
  2722. tabId: this.GLExcelFrom.id,
  2723. });
  2724. console.log(res);
  2725. if (res.code === 200) {
  2726. this.$message({
  2727. type: "success",
  2728. message: "关联清表成功",
  2729. });
  2730. // selectByNodeTable刷新表单列表
  2731. this.updateNodeTable();
  2732. this.GLExcel = false;
  2733. console.log(this.GLExcelFrom,'GLExcelFrom');
  2734. this.rightClick(
  2735. this.GLExcelFrom.id,
  2736. this.GLExcelFrom.excelId,
  2737. this.GLExcelFrom.ids,
  2738. this.GLExcelFrom.initTableName,
  2739. this.GLExcelFrom.initTableId
  2740. );
  2741. }
  2742. } else {
  2743. this.$message({
  2744. type: "warning",
  2745. message: "请先设置清表",
  2746. });
  2747. }
  2748. },
  2749. getReturnNode2(node,_array,value){
  2750. let isPass = node.data && node.data.name && node.data.name.indexOf(value) !== -1;
  2751. isPass?_array.push(isPass):'';
  2752. if(!isPass && node.level!=1 && node.parent){
  2753. this.getReturnNode2(node.parent,_array,value);
  2754. }
  2755. },
  2756. filterNode222(value,data,node) {
  2757. if(!value){
  2758. return true;
  2759. }
  2760. let level = node.level;
  2761. let _array = [];//这里使用数组存储 只是为了存储值。
  2762. this.getReturnNode2(node,_array,value);
  2763. let result = false;
  2764. _array.forEach((item)=>{
  2765. result = result || item;
  2766. });
  2767. return result;
  2768. },
  2769. //#endregion
  2770. //#region 节点参数
  2771. nodeInfo(data) {
  2772. //节点参数按钮
  2773. this.keymap();
  2774. //console.log(data)
  2775. this.jiedianId = data.primaryKeyId;
  2776. this.parameters(data.primaryKeyId);
  2777. this.nodeInfoVisible = true;
  2778. },
  2779. addNodeInfoTable() {
  2780. //添加节点参数数据
  2781. this.nodeInfoTable.unshift({
  2782. k: "",
  2783. v: "",
  2784. remark: "",
  2785. nodeId: this.jiedianId,
  2786. type: 1,
  2787. });
  2788. console.log(this.nodeInfoTable)
  2789. },
  2790. refreshnfoTable(){
  2791. //刷新表格
  2792. let prams={
  2793. nodeId: this.jiedianId,
  2794. type: 1,
  2795. projectId: this.projectid
  2796. }
  2797. this.nodeInfoTableLoad=true
  2798. refrehPram(prams).then((res)=>{
  2799. this.nodeInfoTableLoad=false;
  2800. if(res.data.code==200){
  2801. this.$message.success('刷新成功');
  2802. }
  2803. })
  2804. },
  2805. delNodeInfo(key,obj) {
  2806. this.delids.push(obj.id)
  2807. //设置参数名称中的删除按钮
  2808. this.namelists.splice(key, 1);
  2809. },
  2810. delNodeInfoss(key,obj) {
  2811. this.delids.push(obj.id)
  2812. //节点参数
  2813. this.nodeInfoTable.splice(key, 1);
  2814. },
  2815. setNodeParameters() {
  2816. //打开设置节点参数弹框按钮
  2817. this.infoNameVisible = true;
  2818. this.namelists = [...this.namelist];
  2819. },
  2820. async setParameterName() {
  2821. //设置参数名称中添加节点参数按钮
  2822. // wbsId: this.jiedianId
  2823. this.namelists.unshift({ name: "", remark: "", k: "", type: 0 });
  2824. },
  2825. async nodeInfoSave() {
  2826. //节点参数弹框保存按钮
  2827. if (this.nodeInfoTable) {
  2828. // if (this.nodeInfoTable.length == 0) {
  2829. // await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,type:1,delIds:this.delids,wps:[
  2830. // {
  2831. // nodeId: this.jiedianId,
  2832. // type: -1,
  2833. // },
  2834. // ]});
  2835. // this.nodeInfoVisible = false;
  2836. // this.delIds=[];
  2837. // this.$message({
  2838. // type: "success",
  2839. // message: "保存参数节点成功!",
  2840. // });
  2841. // return;
  2842. // }
  2843. console.log(this.namelist)
  2844. let tag = true;
  2845. this.nodeInfoTable.forEach((val) => {
  2846. if (!val.k | !val.v) {
  2847. return (tag = false);
  2848. }
  2849. if (!val.name) {
  2850. for (let i = 0; i < this.namelist.length; i++) {
  2851. if (this.namelist[i].k == val.k) {
  2852. val.name = this.namelist[i].name;
  2853. return;
  2854. }
  2855. }
  2856. }
  2857. });
  2858. if (tag) {
  2859. await this.saveOrUpdateBatch({scopeType:10,projectId:this.projectid,nodeId:this.jiedianId,wps:this.nodeInfoTable,type:1,delIds:this.delids});
  2860. this.nodeInfoVisible = false;
  2861. this.delIds=[];
  2862. this.$message({
  2863. type: "success",
  2864. message: "设置参数节点成功!",
  2865. });
  2866. } else {
  2867. this.$message({
  2868. type: "error",
  2869. message: "请填写所有的参数名称和参数值!",
  2870. });
  2871. }
  2872. } else {
  2873. this.$message({
  2874. type: "error",
  2875. message: "请先设置参数节点!",
  2876. });
  2877. }
  2878. },
  2879. async addParameterName() {
  2880. //设置参数名称中的保存按钮
  2881. if (this.namelists.length) {
  2882. let tag = true;
  2883. this.namelists.forEach((val) => {
  2884. if (!val.name || !val.k) {
  2885. return (tag = false);
  2886. }
  2887. });
  2888. if (tag) {
  2889. await this.saveOrUpdateBatch({scopeType:10,projectId:this.projectid,nodeId:this.jiedianId,wps:this.namelists,type:0,delIds:this.delids}); //保存设置参数
  2890. this.infoNameVisible = false;
  2891. this.delIds=[];
  2892. this.keymap();
  2893. } else {
  2894. this.$message({
  2895. type: "error",
  2896. message: "请填写所有的参数名称和参数值KEY!",
  2897. });
  2898. }
  2899. } else {
  2900. this.$message({
  2901. type: "warning",
  2902. message: "请先添加参数",
  2903. });
  2904. }
  2905. },
  2906. closeParameter() {
  2907. //设置参数名称,关闭按钮
  2908. this.namelists = [];
  2909. this.infoNameVisible = false;
  2910. },
  2911. async parameters(wbsId) {
  2912. //获取接待你参数列表
  2913. const { data: res } = await parameters({ wbsId });
  2914. console.log(res);
  2915. if (res.code == 200) {
  2916. this.nodeInfoTable = res.data;
  2917. }
  2918. },
  2919. async saveOrUpdateBatch(da) {
  2920. //保存
  2921. const { data: res } = await saveOrUpdateBatch(da);
  2922. this.delids=[];
  2923. console.log(res);
  2924. },
  2925. async keymap() {
  2926. //节点参数枚举
  2927. const { data: res } = await keymap();
  2928. console.log(res);
  2929. if (res.code == 200) {
  2930. this.namelist = res.data;
  2931. }
  2932. },
  2933. //#endregion
  2934. //#region 调整表单
  2935. adjustExcel(pkeyId, excelId) {
  2936. //调整表单
  2937. this.GLExcelFrom.id = pkeyId;
  2938. this.getExcelHtml(pkeyId);
  2939. },
  2940. async getExcelHtml(pkeyId) {
  2941. const { data: res } = await getExcelHtml({ pkeyId });
  2942. console.log(res);
  2943. if (res.code === 200) {
  2944. localStorage.setItem("excelHtml", res.data);
  2945. this.adjustmentExcel = res.data;
  2946. this.excelHtml = true;
  2947. }
  2948. },
  2949. removeExcel() {
  2950. this.excelHtml = false;
  2951. },
  2952. //#endregion
  2953. //#region 编辑元素
  2954. async rightClick(pkeyId, excelId, id, initTableName,initTableId) {
  2955. await this.getExcelHtml2(pkeyId);
  2956. this.editElementQuery.pkeyId = pkeyId;
  2957. this.editElementQuery.excelId = excelId;
  2958. this.editElementQuery.id = id;
  2959. this.editElementQuery.initTableName = initTableName;
  2960. this.editElementQuery.initTableId = initTableId;
  2961. this.editElementQuery.pid = this.$route.query.pid;
  2962. this.editElementQuery.wbsid = this.$route.query.wbsid;
  2963. this.editElementQuery.nodeid = this.curTreeData.id;
  2964. this.editElementVisible = true;
  2965. },
  2966. async getExcelHtml2(pkeyId) {
  2967. const { data: res } = await getExcelHtml({ pkeyId });
  2968. console.log(res);
  2969. if (res.code === 200) {
  2970. localStorage.setItem("editElement", res.data);
  2971. }
  2972. },
  2973. //#endregion
  2974. //#region 元素表单信息
  2975. editEditElementForm() {
  2976. //标记元素
  2977. if (this.formData.length) {
  2978. let da = [];
  2979. this.formDatass = [...this.formData];
  2980. this.formDatass.forEach((val) => {
  2981. da.push({
  2982. tableType: val.tableType - 0,
  2983. tableOwner: val.tableOwner - 0,
  2984. pkeyId: val.pkeyId,
  2985. tableName: val.tableName,
  2986. fillRate: val.fillRate,
  2987. });
  2988. });
  2989. this.formDatass = da;
  2990. this.editElementFormTag = true;
  2991. }
  2992. },
  2993. editeditElementFormMF() {
  2994. //保存按钮
  2995. let da = [];
  2996. let tag = true;
  2997. this.formDatass.forEach((val) => {
  2998. if (!val.tableName || !val.tableType || !val.tableOwner) {
  2999. tag = false;
  3000. return;
  3001. } else {
  3002. da.push({
  3003. pkeyId: val.pkeyId,
  3004. nodeName: val.tableName,
  3005. tableType: val.tableType,
  3006. tableOwner: val.tableOwner,
  3007. fillRate: val.fillRate,
  3008. });
  3009. }
  3010. });
  3011. if (tag) {
  3012. this.updateBatchNodeTableInfo2(da);
  3013. } else {
  3014. this.$message({
  3015. type: "success",
  3016. message: "请填写完整元素表单的所有信息!",
  3017. });
  3018. }
  3019. },
  3020. async updateBatchNodeTableInfo2(da) {
  3021. this.editeditElementFormMFLoading=true
  3022. //共有编辑元素
  3023. const { data: res } = await updateBatchNodeTableInfo2(da);
  3024. if (res.code == 200) {
  3025. this.editElementFormTag = false;
  3026. this.updateNodeTable();
  3027. this.editeditElementFormMFLoading=false
  3028. }
  3029. this.editeditElementFormMFLoading=false
  3030. },
  3031. //#endregion
  3032. //获取节点展开路径
  3033. getExpandedKeys(node) {
  3034. //console.log(node)
  3035. let expandedKeys = [];
  3036. while (node.parent) {
  3037. expandedKeys.push(node.data.id);
  3038. node = node.parent;
  3039. }
  3040. setStore({
  3041. name: this.expandName,
  3042. content: expandedKeys,
  3043. type: true, //sessionStorage
  3044. });
  3045. //console.log(expandedKeys)
  3046. },
  3047. //触发节点参数
  3048. nodeInfoHandle() {
  3049. if (!this.curTreeData.id) {
  3050. this.$message({
  3051. type: "warning",
  3052. message: "请先选择节点",
  3053. });
  3054. return;
  3055. }
  3056. this.nodeInfo(this.curTreeData);
  3057. },
  3058. eleFormulaHandle() {
  3059. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3060. this.$message({
  3061. type: "warning",
  3062. message: "请先选择节点",
  3063. });
  3064. return;
  3065. }
  3066. this.setLeftType(4, this.curTreeData, this.curTreeNode);
  3067. // this.showType = 2;
  3068. },
  3069. editNodeHandle() {
  3070. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3071. this.$message({
  3072. type: "warning",
  3073. message: "请先选择节点",
  3074. });
  3075. return;
  3076. }
  3077. this.mixRatioTestIds = [];
  3078. this.nodeTypeChange(53);
  3079. this.setLeftType(2, this.curTreeData, this.curTreeNode);
  3080. },
  3081. copyNodeHandle() {
  3082. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3083. this.$message({
  3084. type: "warning",
  3085. message: "请先选择节点",
  3086. });
  3087. return;
  3088. }
  3089. },
  3090. delNodeHandle() {
  3091. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3092. this.$message({
  3093. type: "warning",
  3094. message: "请先选择节点",
  3095. });
  3096. return;
  3097. }
  3098. if (this.curTreeNode.level == 1) {
  3099. this.$message({
  3100. type: "warning",
  3101. message: "当前节点无法删除",
  3102. });
  3103. return;
  3104. }
  3105. this.deleNode(this.curTreeData, this.curTreeNode);
  3106. },
  3107. eleHandle() {
  3108. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3109. this.$message({
  3110. type: "warning",
  3111. message: "请先选择节点",
  3112. });
  3113. return;
  3114. }
  3115. this.setLeftType(5, this.curTreeData, this.curTreeNode);
  3116. },
  3117. syncInfoHandle() {
  3118. this.$confirm("是否同步节点参数?", "提示", {
  3119. confirmButtonText: "确定",
  3120. cancelButtonText: "取消",
  3121. type: "warning",
  3122. }).then(() => {
  3123. this.syncBtnLoad = true;
  3124. syncNodeParam(this.projectid)
  3125. .then(() => {
  3126. this.$message({
  3127. type: "success",
  3128. message: "同步成功!",
  3129. });
  3130. })
  3131. .finally(() => {
  3132. this.syncBtnLoad = false;
  3133. });
  3134. });
  3135. },
  3136. //显示别名弹窗
  3137. aliasShow() {
  3138. this.aliasVisible = true;
  3139. if (this.nodeDetail.fullName) {
  3140. this.aliasArr = this.nodeDetail.fullName.split(",");
  3141. } else {
  3142. this.aliasArr = [];
  3143. }
  3144. this.aliasInput = "";
  3145. },
  3146. addAlias() {
  3147. if (this.aliasInput) {
  3148. this.aliasArr.push(this.aliasInput);
  3149. this.aliasInput = "";
  3150. }
  3151. },
  3152. delAlias(index) {
  3153. this.aliasArr.splice(index, 1);
  3154. },
  3155. saveAliasHandle() {
  3156. this.nodeDetail.fullName = this.aliasArr.join(",");
  3157. if (this.editType == 1) {
  3158. //新增
  3159. this.aliasVisible = false;
  3160. } else if (this.editType == 2) {
  3161. //编辑 私有
  3162. privateSubmitFullName(
  3163. this.nodeDetail.pKeyId,
  3164. this.nodeDetail.fullName
  3165. ).then(() => {
  3166. this.$message({
  3167. type: "success",
  3168. message: "保存成功",
  3169. });
  3170. this.aliasVisible = false;
  3171. });
  3172. }
  3173. },
  3174. syncNodeTableHandle(data) {
  3175. this.$confirm("是否同步节点【" + data.title + "】?", "提示", {
  3176. confirmButtonText: "确定",
  3177. cancelButtonText: "取消",
  3178. type: "warning",
  3179. }).then(() => {
  3180. let notify = this.$notify({
  3181. title: "提示",
  3182. message: "节点数据同步中...",
  3183. duration: 0,
  3184. });
  3185. syncNodeTable(data.primaryKeyId)
  3186. .then(() => {
  3187. this.updateNodeTable();
  3188. this.$message({
  3189. type: "success",
  3190. message: "同步成功",
  3191. });
  3192. })
  3193. .catch(() => {
  3194. this.$message({
  3195. type: "error",
  3196. message: "同步失败",
  3197. });
  3198. })
  3199. .finally(() => {
  3200. notify.close();
  3201. });
  3202. });
  3203. },
  3204. syncProjectHandle (data) {
  3205. this.$confirm("是否同步节点【" + data.title + "】?", "提示", {
  3206. confirmButtonText: "确定",
  3207. cancelButtonText: "取消",
  3208. type: "warning",
  3209. }).then(() => {
  3210. let notify = this.$notify({
  3211. title: "提示",
  3212. message: "节点数据同步中...",
  3213. duration: 0,
  3214. });
  3215. syncNodeinfo(data.primaryKeyId)
  3216. .then(() => {
  3217. this.updateNodeTable();
  3218. this.$message({
  3219. type: "success",
  3220. message: "同步成功",
  3221. });
  3222. })
  3223. .catch(() => {
  3224. this.$message({
  3225. type: "error",
  3226. message: "同步失败",
  3227. });
  3228. })
  3229. .finally(() => {
  3230. notify.close();
  3231. });
  3232. });
  3233. },
  3234. typeTreeLoadNode(node, resolve) {
  3235. let pid = 0;
  3236. if (node.level != 0) {
  3237. pid = node.data.id;
  3238. }
  3239. tabTypeLazyTree(pid, this.projectid).then((res) => {
  3240. let arr = [];
  3241. if (Array.isArray(res.data.data)) {
  3242. arr = res.data.data;
  3243. }
  3244. return resolve(arr);
  3245. });
  3246. },
  3247. getTypeTreeDetail() {},
  3248. independent(){
  3249. console.log('独立表单库');
  3250. this.$router.push({
  3251. path: '/project/independent',
  3252. query: { pid: this.projectid,wbsid:this.$route.query.wbsid }
  3253. });
  3254. },
  3255. //节点参数 关联元素
  3256. linkEle(row){
  3257. this.linkEleVisible = true;
  3258. this.curParam = row;
  3259. getParamElements({nodeId:this.curTreeData.id,projectId:this.projectid,paramId:row.id,scopeType:10}).then((res) => {
  3260. if (res.data.data.length) {
  3261. this.linkEleTableList = res.data.data;
  3262. } else {
  3263. this.linkEleTableList = [];
  3264. }
  3265. })
  3266. },
  3267. //关联元素弹框
  3268. tolinkEle(row){
  3269. this.curLinkEleTable = row;
  3270. this.linkCheckVisible = true;
  3271. selectFormElements(row.id,{type:0}).then((res) => {
  3272. res.data.data.forEach((ele)=>{
  3273. ele.checked = false;
  3274. ele.show = true;
  3275. })
  3276. this.linkEleList = res.data.data;
  3277. this.linkEleListAll = [].concat(this.linkEleList);
  3278. })
  3279. },
  3280. //删除关联
  3281. delLink(data){
  3282. this.$confirm('删除关联, 是否继续?', '提示', {
  3283. confirmButtonText: '确定',
  3284. cancelButtonText: '取消',
  3285. type: 'warning'
  3286. }).then(() => {
  3287. console.log(data)
  3288. delParamElements(data).then(() => {
  3289. this.$message({
  3290. type: "success",
  3291. message: "删除成功!"
  3292. });
  3293. getParamElements({nodeId:this.curTreeData.id,projectId:this.projectid,paramId:this.curParam.id,scopeType:10}).then((res) => {
  3294. if (res.data.data.length) {
  3295. this.linkEleTableList = res.data.data;
  3296. } else {
  3297. this.linkEleTableList = [];
  3298. } })
  3299. })
  3300. }).catch(() => {
  3301. });
  3302. },
  3303. //筛选元素
  3304. searchEle(){
  3305. this.linkEleList = this.linkEleListAll.filter((ele)=>{
  3306. return ele.eName.indexOf(this.linkEleKey) > -1;
  3307. })
  3308. },
  3309. linkEleCheck(value,index){
  3310. //console.log(value)
  3311. if(value){
  3312. this.linkEleList.forEach((ele,i)=>{
  3313. if(i != index){
  3314. ele.checked = false;
  3315. }
  3316. })
  3317. }
  3318. },
  3319. //关联元素
  3320. saveLinkEle(){
  3321. let target={}
  3322. this.linkEleList.forEach(e=>{
  3323. if(e.checked==true){
  3324. target={elementId:e.id,paramId:this.curParam.id};
  3325. }
  3326. })
  3327. specifiedParamElements(target).then(data=>{
  3328. this.linkCheckVisible = false;
  3329. getParamElements({nodeId:this.curTreeData.id,projectId:this.projectid,paramId:this.curParam.id,scopeType:10}).then((res) => {
  3330. if (res.data.data.length) {
  3331. this.linkEleTableList = res.data.data;
  3332. } else {
  3333. this.linkEleTableList = [];
  3334. }})
  3335. })
  3336. },
  3337. },
  3338. watch: {
  3339. "GLExcelFrom.search"(val) {
  3340. console.log(val);
  3341. if (this.exceldata) {
  3342. this.$refs.tree.filter(val);
  3343. }
  3344. },
  3345. },
  3346. components: {
  3347. dynamicExcel,
  3348. ManualSorting,
  3349. FormulaEdit,
  3350. EditElement,
  3351. FormulaEditone
  3352. },
  3353. };
  3354. </script>
  3355. <style scoped lang="scss">
  3356. .font-s-12 /deep/ .iconfont {
  3357. font-size: 12px;
  3358. }
  3359. .el-popper[x-placement^="bottom"] {
  3360. margin-top: -6px;
  3361. }
  3362. .right-btn {
  3363. position: absolute;
  3364. right: 20px;
  3365. top: 10px;
  3366. font-size: 20px;
  3367. }
  3368. .custom-tree-node {
  3369. .normal-black {
  3370. display: none;
  3371. }
  3372. &:hover {
  3373. .normal-black {
  3374. display: inline-block;
  3375. }
  3376. }
  3377. &.show .normal-black {
  3378. display: inline-block;
  3379. }
  3380. }
  3381. .excelBox {
  3382. /deep/.el-dialog__body {
  3383. padding: 20px;
  3384. }
  3385. }
  3386. //调整表单样式
  3387. .excelHtml {
  3388. position: absolute;
  3389. z-index: 999999;
  3390. top: 50px;
  3391. left: 0px;
  3392. width: 100%;
  3393. height: 100%;
  3394. }
  3395. .jiedian {
  3396. /deep/.el-dialog__body {
  3397. padding: 10px 20px !important;
  3398. }
  3399. }
  3400. .filter-tree {
  3401. min-width: 100%;
  3402. display: inline-block;
  3403. }
  3404. .full-dialog {
  3405. /deep/ .el-dialog__body {
  3406. padding-bottom: 0;
  3407. padding-top: 0;
  3408. }
  3409. /deep/ .basic-container {
  3410. height: calc(100vh - 60px);
  3411. }
  3412. }
  3413. .my-basic-con {
  3414. padding: 6px 6px;
  3415. }
  3416. </style>