PipeIine.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. <template>
  2. <div >
  3. <el-dialog
  4. v-model="dialogVisiblenode"
  5. align-center :append-to-body="true"
  6. width="700"
  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(500);
  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 pageSize4 = ref(5)
  99. onMounted(()=>{
  100. })
  101. // 巷道方法
  102. // 选择巷道
  103. const fireclick = () => {
  104. pipelinedata('');
  105. }
  106. const tableRowClassName = ({ row, rowIndex }) => {
  107. if (rowIndex % 2 != 0) {
  108. return 'evenRow';
  109. }
  110. return 'oddRow';
  111. }
  112. // 管道搜索
  113. function searchgd() {
  114. searchtag.value=searchtaggd.value;
  115. pipelinedata( searchtaggd.value);
  116. }
  117. // 管道分页查询
  118. const handleCurrentChange = (val) => {
  119. pipelinedata()
  120. }
  121. //管道数据查询
  122. const pipelinedata = (searchtag) => {
  123. const params = {
  124. transCode: 'D00001',
  125. count: pageSize4.value,
  126. page: currentPage4.value,
  127. searchtag: searchtag,
  128. }
  129. request(params)
  130. .then((res) => {
  131. tableData2.value = res.rows;
  132. total.value = res.total;
  133. })
  134. .catch((err) => {
  135. ElMessage.error(err.returnMsg)
  136. })
  137. }
  138. //选中项
  139. const projectsSelectionSelect=(selection, row)=>{
  140. if(selection.length>1){
  141. multipleTableRef.value.clearSelection();
  142. multipleTableRef.value.toggleRowSelection(row,true);
  143. let arrp=[];
  144. arrp.push(selection[1])
  145. multipleSelection.value = arrp;
  146. return;
  147. }
  148. if(selection.length==1){
  149. multipleSelection.value=selection;
  150. }else if(selection.length==0){
  151. }
  152. }
  153. const selectfun=()=>{
  154. emit('pipelineapi', '');
  155. currentPage4.value=1;
  156. if(multipleSelection.value.length!=0){
  157. // firepid.value=multipleSelection.value[0].id;
  158. emit('pipelineapi',multipleSelection.value[0]);
  159. // console.log(multipleSelection.value[0])
  160. }else{
  161. }
  162. }
  163. // 确定
  164. const queding=()=>{
  165. selectfun();
  166. }
  167. defineExpose({dialogVisiblenode,pipelinedata,searchtaggd});
  168. </script>
  169. <style lang="scss" scoped>
  170. .vtk{
  171. position: absolute;
  172. z-index: 150;
  173. top:70px;
  174. }
  175. .jc_padding .el-table tr {
  176. height: 30px !important;
  177. background: rgba(104, 173, 255, 0.3);
  178. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  179. border-radius: 0px 0px 0px 0px;
  180. border: 1px solid;
  181. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  182. }
  183. .flex_a {
  184. flex: 1;
  185. padding: 0 19px;
  186. }
  187. .btns {
  188. width: 72px;
  189. height: 30px;
  190. background-image: url(../../assets/img/Rectangle399.png);
  191. background-repeat: no-repeat;
  192. line-height: 30px;
  193. overflow: hidden;
  194. margin: 10px 0;
  195. .spantext {
  196. font-weight: bold;
  197. font-size: 12px;
  198. color: #FFFFFF;
  199. text-align: left;
  200. font-style: normal;
  201. text-transform: none;
  202. }
  203. }
  204. .header_z {
  205. box-shadow: none !important;
  206. padding: 10px 20px !important;
  207. }
  208. .header_l {
  209. line-height: 10px;
  210. text-align: left;
  211. padding: 0 20px;
  212. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  213. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  214. border-radius: 0px 0px 0px 0px;
  215. .el-image {
  216. padding: 10px 10px 0 0;
  217. }
  218. h4 {
  219. font-weight: bold;
  220. font-size: 12px;
  221. color: #68ADFF;
  222. line-height: 14px;
  223. text-align: left;
  224. font-style: normal;
  225. text-transform: none;
  226. }
  227. }
  228. .jc_padding {
  229. padding: 18px 10px;
  230. }
  231. .line {
  232. border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  233. box-sizing: border-box;
  234. }
  235. .L_aside {
  236. .iconimg {
  237. width: 37px;
  238. height: 36px;
  239. margin: 0 7px 0 24px;
  240. }
  241. }
  242. .ddd {
  243. margin-top: 20px;
  244. .ddd_div {
  245. padding: 20px 0;
  246. position: relative;
  247. }
  248. .class_btn {
  249. position: absolute;
  250. right: 0;
  251. top: 21px;
  252. }
  253. .header_l {
  254. line-height: 10px;
  255. text-align: left;
  256. padding: 0 20px;
  257. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  258. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  259. border-radius: 0px 0px 0px 0px;
  260. .el-image {
  261. padding: 10px 10px 0 0;
  262. }
  263. h4 {
  264. font-weight: bold;
  265. font-size: 12px;
  266. color: #68ADFF;
  267. line-height: 14px;
  268. text-align: left;
  269. font-style: normal;
  270. text-transform: none;
  271. }
  272. }
  273. }
  274. .el-dialog__title {
  275. display: inline-block;
  276. }
  277. .bgcolor {
  278. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  279. border-radius: 0px 0px 0px 0px;
  280. border: 1px solid;
  281. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  282. }
  283. .log_class {
  284. .my-header {
  285. line-height: 10px;
  286. height: 40px;
  287. text-align: left;
  288. padding: 0 20px;
  289. border-bottom: 1px solid;
  290. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  291. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  292. border-radius: 0px 0px 0px 0px;
  293. .el-image {
  294. padding: 0px 10px 0 0;
  295. }
  296. h4 {
  297. font-weight: bold;
  298. font-size: 14px;
  299. color: #fff;
  300. line-height: 14px;
  301. text-align: left;
  302. font-style: normal;
  303. text-transform: none;
  304. margin-top: 14px;
  305. }
  306. }
  307. .my_content {
  308. width: 100%;
  309. height: 90px;
  310. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  311. border-radius: 0px 0px 0px 0px;
  312. position: relative;
  313. .radio-group {
  314. display: flex;
  315. justify-content: center;
  316. .el-radio {
  317. flex: 1;
  318. justify-content: center;
  319. font-weight: bold;
  320. font-size: 12px;
  321. color: #FFFFFF;
  322. line-height: 14px;
  323. }
  324. }
  325. }
  326. .el-dialog__footer {
  327. position: absolute;
  328. bottom: 17px;
  329. display: flex;
  330. .footerbtn {
  331. flex: 1;
  332. text-align: center;
  333. }
  334. }
  335. }
  336. .my_content1 {
  337. .el-table .cell {
  338. font-weight: 400;
  339. font-size: 12px;
  340. color: #FFFFFF !important;
  341. line-height: 14px;
  342. text-align: left;
  343. font-style: normal;
  344. text-transform: none;
  345. }
  346. }
  347. .borderimg {
  348. width: 109px;
  349. height: 30px;
  350. background: rgba(104, 173, 255, 0.3);
  351. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  352. /* border: 1px solid rgba(31, 107, 255, 1); */
  353. -o-border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  354. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  355. border-radius: 4px;
  356. display: flex;
  357. display: inline-block;
  358. box-sizing: border-box
  359. }
  360. .el-table,
  361. .el-table thead th {
  362. background-color: rgba(13, 22, 57, 0.96) !important;
  363. }
  364. .el-form-item__label {
  365. color: #FFFFFF !important;
  366. }
  367. .jiancedian {
  368. width: 380px;
  369. position: absolute;
  370. right: 0;
  371. top: 70px;
  372. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  373. border-radius: 4px 4px 4px 4px;
  374. border: 1px solid;
  375. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
  376. }
  377. </style>
  378. <style>
  379. .log_class{
  380. background-color: rgba(13, 22, 57, 0.96) !important;
  381. }
  382. </style>