PipeIine.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <template>
  2. <div >
  3. <el-dialog
  4. v-model="dialogVisiblenode"
  5. align-center :append-to-body="true"
  6. width="500"
  7. class="log_class bgcolor tianjia asideg asidegbg leftbgimg"
  8. >
  9. <template #header="{titleId, titleClass }">
  10. <div class="my-header ">
  11. <el-image :src="icon" fit="contain" ></el-image>
  12. <h4 :id="titleId" :class="titleClass"> 选择巷道</h4>
  13. </div>
  14. </template>
  15. <div class="demo-input-suffix firsttitle leftbgimg2 my_content1">
  16. <div class="guand_1" >
  17. <el-form-item label="巷道选择" :label-width="formLabelWidth5">
  18. <el-input v-model="searchtaggd"
  19. class="w-50 m-2"
  20. placeholder="巷道"
  21. />
  22. </el-form-item>
  23. <div class="asdis_btn">
  24. <div class="flex_a"><div class="btns" @click="searchgd" style="margin-top: 10px;"><span class="spantext" >搜索</span></div></div>
  25. </div>
  26. </div>
  27. <el-table
  28. :row-class-name="tableRowClassName"
  29. :max-height="tableHeight"
  30. ref="multipleTableRef"
  31. :data="tableData2"
  32. style="width: 100%"
  33. @select="projectsSelectionSelect"
  34. :header-cell-style="{'background':'rgba(13, 22, 57, 0.96) '}"
  35. >
  36. <template v-slot:empty>
  37. <p>暂无数据</p>
  38. </template>
  39. <el-table-column type="selection" width="55" />
  40. <!-- <el-table-column property="snId" label="开始节点"/>
  41. <el-table-column property="enId" label="结束节点"/> -->
  42. <el-table-column property="id" label="编号" width="70"/>
  43. <el-table-column property="name" label="名称" width="70"/>
  44. <el-table-column property="sectionType" label="截面类型" width="120"/>
  45. <el-table-column property="roughCoe" label="粗糙系数"/>
  46. <!-- <el-table-column property="sectionPara1" label="截面参数1" width="90"/>
  47. <el-table-column property="sectionPara2" label="截面参数2" width="90" />
  48. <el-table-column property="sectionPara3" label="截面参数3" width="90"/>
  49. <el-table-column property="sectionPara4" label="截面参数4" width="90"/>
  50. <el-table-column property="sectionPara5" label="截面参数5" width="90"/> -->
  51. </el-table>
  52. <div class="demo-pagination-block" style="margin-top: 20px;">
  53. <el-config-provider :locale="zhCn">
  54. <el-pagination
  55. v-model:current-page="currentPage4"
  56. v-model:page-size="pageSize4"
  57. small
  58. background
  59. layout="prev, total,pager, next, jumpe,"
  60. :total="parseInt(total)"
  61. class="mt-4"
  62. @current-change="handleCurrentChange"
  63. />
  64. </el-config-provider>
  65. </div>
  66. <div class="dialog-footer footer_div l_btn">
  67. <div class="footerbtn flex1"><div class="borderimg"><el-button @click="dialogVisiblenode = false">取消</el-button></div></div>
  68. <div class="footerbtn flex1"><div class="borderimg"><el-button @click="queding();dialogVisiblenode = false">
  69. 确定
  70. </el-button></div></div>
  71. </div>
  72. </div>
  73. </el-dialog>
  74. </div>
  75. </template>
  76. <script setup>
  77. import { ref, onMounted, reactive, } from "vue";
  78. import {RouterView,RouterLink } from "vue-router"
  79. import { request, uploadFile } from "@/utils/request";
  80. import { ElMessage, ElButton, ElDialog, ElSelect } from 'element-plus'
  81. import icon from "@/assets/img/icon.png";
  82. import zhCn from 'element-plus/es/locale/lang/zh-cn'
  83. const props= defineProps({ });
  84. let emit = defineEmits(['pipelineapi'])
  85. let sdialog=ref({
  86. dianadddialog:false,
  87. })
  88. let formLabelWidth5=ref(99)
  89. let tableHeight=ref(530);
  90. let tableData2 =ref([]);
  91. const multipleTableRef = ref()
  92. const multipleSelection = ref([])
  93. let dialogVisiblenode=ref(false);
  94. let total = ref(1);
  95. let searchtaggd = ref("");
  96. let searchtag=ref("");
  97. const currentPage4 = ref(1);
  98. const statusMap = {
  99. 'CIRCULAR': '圆形',
  100. 'RECTANGLE': '矩形',
  101. 'SEMICIRCULAR': '半椭圆形',
  102. 'SEMIELLIPTICAL': '半圆形',
  103. 'EGG': '蛋形',
  104. 'GOTHIC': '哥特形',
  105. 'MODBASKETHANDLE': '更正蓝形',
  106. 'ARCH': '拱形',
  107. 'RECT_ROUND': '弧底矩形',
  108. 'BASKETHANDLE': '蓝形',
  109. 'HORSESHOE': '马蹄形',
  110. 'RECT_TRIANGULAR': '三角底矩形',
  111. 'VERT_ELLIPSE': '竖向椭圆',
  112. 'HORZI_ELLIPSE': '水平椭圆',
  113. 'CATENARY': '悬链式',
  114. };
  115. const pageSize4 = ref(5)
  116. onMounted(()=>{
  117. })
  118. // 巷道方法
  119. // 选择巷道
  120. const fireclick = () => {
  121. pipelinedata('');
  122. }
  123. const tableRowClassName = ({ row, rowIndex }) => {
  124. if (rowIndex % 2 != 0) {
  125. return 'evenRow';
  126. }
  127. return 'oddRow';
  128. }
  129. // 管道搜索
  130. function searchgd() {
  131. searchtag.value=searchtaggd.value;
  132. pipelinedata( searchtaggd.value);
  133. }
  134. // 管道分页查询
  135. const handleCurrentChange = (val) => {
  136. pipelinedata()
  137. }
  138. //管道数据查询
  139. const pipelinedata = (searchtag) => {
  140. const params = {
  141. transCode: 'D00001',
  142. count: pageSize4.value,
  143. page: currentPage4.value,
  144. searchtag: searchtag,
  145. }
  146. request(params)
  147. .then((res) => {
  148. tableData2.value = res.rows.map(item => {
  149. return {
  150. ...item,
  151. sectionType: statusMap[item.sectionType] || '未知' // 如果状态不存在,默认设置为'未知'
  152. };
  153. });
  154. total.value = res.total;
  155. })
  156. .catch((err) => {
  157. ElMessage.error(err.returnMsg)
  158. })
  159. }
  160. //选中项
  161. const projectsSelectionSelect=(selection, row)=>{
  162. if(selection.length>1){
  163. multipleTableRef.value.clearSelection();
  164. multipleTableRef.value.toggleRowSelection(row,true);
  165. let arrp=[];
  166. arrp.push(selection[1])
  167. multipleSelection.value = arrp;
  168. return;
  169. }
  170. if(selection.length==1){
  171. multipleSelection.value=selection;
  172. }else if(selection.length==0){
  173. }
  174. }
  175. const selectfun=()=>{
  176. emit('pipelineapi', '');
  177. currentPage4.value=1;
  178. if(multipleSelection.value.length!=0){
  179. // firepid.value=multipleSelection.value[0].id;
  180. emit('pipelineapi',multipleSelection.value[0]);
  181. // console.log(multipleSelection.value[0])
  182. }else{
  183. }
  184. }
  185. // 确定
  186. const queding=()=>{
  187. selectfun();
  188. }
  189. defineExpose({dialogVisiblenode,pipelinedata,searchtaggd});
  190. </script>
  191. <style lang="scss" scoped>
  192. .vtk{
  193. position: absolute;
  194. z-index: 150;
  195. top:70px;
  196. }
  197. .jc_padding .el-table tr {
  198. height: 30px !important;
  199. background: rgba(104, 173, 255, 0.3);
  200. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  201. border-radius: 0px 0px 0px 0px;
  202. border: 1px solid;
  203. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  204. }
  205. .flex_a {
  206. flex: 1;
  207. padding: 0 19px;
  208. }
  209. .btns {
  210. width: 72px;
  211. height: 30px;
  212. background-image: url(../../assets/img/Rectangle399.png);
  213. background-repeat: no-repeat;
  214. line-height: 30px;
  215. overflow: hidden;
  216. margin: 10px 0;
  217. .spantext {
  218. font-weight: bold;
  219. font-size: 12px;
  220. color: #FFFFFF;
  221. text-align: left;
  222. font-style: normal;
  223. text-transform: none;
  224. }
  225. }
  226. .header_z {
  227. box-shadow: none !important;
  228. padding: 10px 20px !important;
  229. }
  230. .header_l {
  231. line-height: 10px;
  232. text-align: left;
  233. padding: 0 20px;
  234. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  235. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  236. border-radius: 0px 0px 0px 0px;
  237. .el-image {
  238. padding: 10px 10px 0 0;
  239. }
  240. h4 {
  241. font-weight: bold;
  242. font-size: 12px;
  243. color: #68ADFF;
  244. line-height: 14px;
  245. text-align: left;
  246. font-style: normal;
  247. text-transform: none;
  248. }
  249. }
  250. .jc_padding {
  251. padding: 18px 10px;
  252. }
  253. .line {
  254. border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  255. box-sizing: border-box;
  256. }
  257. .L_aside {
  258. .iconimg {
  259. width: 37px;
  260. height: 36px;
  261. margin: 0 7px 0 24px;
  262. }
  263. }
  264. .ddd {
  265. margin-top: 20px;
  266. .ddd_div {
  267. padding: 20px 0;
  268. position: relative;
  269. }
  270. .class_btn {
  271. position: absolute;
  272. right: 0;
  273. top: 21px;
  274. }
  275. .header_l {
  276. line-height: 10px;
  277. text-align: left;
  278. padding: 0 20px;
  279. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  280. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  281. border-radius: 0px 0px 0px 0px;
  282. .el-image {
  283. padding: 10px 10px 0 0;
  284. }
  285. h4 {
  286. font-weight: bold;
  287. font-size: 12px;
  288. color: #68ADFF;
  289. line-height: 14px;
  290. text-align: left;
  291. font-style: normal;
  292. text-transform: none;
  293. }
  294. }
  295. }
  296. .el-dialog__title {
  297. display: inline-block;
  298. }
  299. .bgcolor {
  300. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  301. border-radius: 0px 0px 0px 0px;
  302. border: 1px solid;
  303. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  304. }
  305. .log_class {
  306. .my-header {
  307. line-height: 10px;
  308. height: 40px;
  309. text-align: left;
  310. padding: 0 20px;
  311. border-bottom: 1px solid;
  312. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  313. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  314. border-radius: 0px 0px 0px 0px;
  315. .el-image {
  316. padding: 0px 10px 0 0;
  317. }
  318. h4 {
  319. font-weight: bold;
  320. font-size: 14px;
  321. color: #fff;
  322. line-height: 14px;
  323. text-align: left;
  324. font-style: normal;
  325. text-transform: none;
  326. margin-top: 14px;
  327. }
  328. }
  329. .my_content {
  330. width: 100%;
  331. height: 90px;
  332. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  333. border-radius: 0px 0px 0px 0px;
  334. position: relative;
  335. .radio-group {
  336. display: flex;
  337. justify-content: center;
  338. .el-radio {
  339. flex: 1;
  340. justify-content: center;
  341. font-weight: bold;
  342. font-size: 12px;
  343. color: #FFFFFF;
  344. line-height: 14px;
  345. }
  346. }
  347. }
  348. .el-dialog__footer {
  349. position: absolute;
  350. bottom: 17px;
  351. display: flex;
  352. .footerbtn {
  353. flex: 1;
  354. text-align: center;
  355. }
  356. }
  357. }
  358. .my_content1 {
  359. .el-table .cell {
  360. font-weight: 400;
  361. font-size: 12px;
  362. color: #FFFFFF !important;
  363. line-height: 14px;
  364. text-align: left;
  365. font-style: normal;
  366. text-transform: none;
  367. }
  368. }
  369. .borderimg {
  370. width: 109px;
  371. height: 30px;
  372. background: rgba(104, 173, 255, 0.3);
  373. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  374. /* border: 1px solid rgba(31, 107, 255, 1); */
  375. -o-border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  376. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  377. border-radius: 4px;
  378. display: flex;
  379. display: inline-block;
  380. box-sizing: border-box
  381. }
  382. .el-table,
  383. .el-table thead th {
  384. background-color: rgba(13, 22, 57, 0.96) !important;
  385. }
  386. .el-form-item__label {
  387. color: #FFFFFF !important;
  388. }
  389. .jiancedian {
  390. width: 380px;
  391. position: absolute;
  392. right: 0;
  393. top: 70px;
  394. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  395. border-radius: 4px 4px 4px 4px;
  396. border: 1px solid;
  397. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  398. }
  399. </style>
  400. <style>
  401. .log_class{
  402. background-color: rgba(13, 22, 57, 0.96) !important;
  403. }
  404. </style>