index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <div class="tabForm">
  3. <div class="tabForm_header">
  4. <div class="imge_tab">
  5. <img src="../../../assets/images/pic_sy_ytj.png" alt="" v-if="imgShoew == 2" >
  6. <img src="../../../assets/images/pic_sy_shz.png" alt="" v-if="imgShoew == 4" >
  7. <img src="../../../assets/images/pic_sy_ybh.png" alt="" v-if="imgShoew == 3" >
  8. </div>
  9. <div class="table_headerBtun" v-if="queryData.buttonList">
  10. <el-button type="primary" size="small" plain @click="handleQuery(item)" v-for="(item,index) in queryData.buttonList.split('')" :key="index">{{item | btnConversion}}</el-button>
  11. <el-button type="primary" size="small" plain @click="handleQuery('sx')">刷新</el-button>
  12. <el-button type="primary" size="small" plain @click="handleQuery('fh')">返回</el-button>
  13. </div>
  14. </div>
  15. <!-- 内容 -->
  16. <div class="table_nav " >
  17. <el-collapse v-model="activeNames">
  18. <div class="table_forem">
  19. <el-form :model="queryParams" :rules="queryData.rules" ref="queryForm" :inline="true" :label-width="this.queryData.table_column == 6 ? '70px' :'120px'">
  20. <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index" class="eitde">
  21. <el-row :gutter="0">
  22. <dynamic-formsteo @iChange="iChange" :queryData="queryData" @modelFn="modelFn" :ref="items.columnName" :config="queryParams" @inputs = "changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren" :key='indexs' />
  23. </el-row>
  24. </el-collapse-item>
  25. </el-form>
  26. </div>
  27. <!-- 列表 -->
  28. <el-collapse-item :title="title" name="lised" class="eitde" v-if="tabShoes">
  29. <div class="ppl">
  30. <p v-for="(item,index) in tabldie" :key="index" @click="enditTab(index)">
  31. <img src="../../../assets/images/icon_tbtab_normal.png" alt="" class="index_headerImg" v-if="numtab !== index">
  32. <img src="../../../assets/images/icon_tbtab_selected.png" alt="" class="index_headerImg" v-if="numtab == index">
  33. <span :class="[index == numtab ? 'span' : '']">{{item.tableComment}}</span>
  34. </p>
  35. </div>
  36. <el-divider></el-divider>
  37. <div style="display: flex; align-items: center; margin-bottom: 20px;" class="hiueo">
  38. <el-form style="display: flex; align-items:center;" :model="queryParamstwoi" ref="queryForm" :inline="true" >
  39. <DynamicForms :ref="item.columnName" :config="queryParamstwoi" @inputs="changeFn" :formConfig="item" v-for="(item,index) in queryDatatao.queryList"
  40. :key='index' />
  41. <el-form-item>
  42. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryiu">搜索</el-button>
  43. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  44. </el-form-item>
  45. </el-form>
  46. <el-button type="primary" size="small" plain v-for="(item,indexss) in jeigneutwo" :key="item + indexss"
  47. @click="handleQueryju(item)">{{item}}</el-button>
  48. </div>
  49. <el-table v-loading="loading" :data="postList.rows" @selection-change="handleSelectionChange">
  50. <el-table-column type="selection" width="55" style="color: red;" align="center" />
  51. <template v-for="(item, index) in postList.tableHeadList">
  52. <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" :key="index" >
  53. <template slot-scope="scope">
  54. <img class="img_icon" v-if="item.htmlType=='imageUpload' && scope.row[scope.column.property]" @click="imgBtn(JSON.parse(scope.row[scope.column.property])[0].url)"
  55. :src="JSON.parse(scope.row[scope.column.property])[0].url" alt="">
  56. <span :style="scope.row.list_class" v-else-if="item.columnName == 'status' " >{{ scope.row[scope.column.property] }}</span>
  57. <span v-else>{{ scope.row[scope.column.property] }}</span>
  58. </template>
  59. </el-table-column>
  60. </template>
  61. </el-table>
  62. <div class="index_haderPagin">
  63. <pagination
  64. v-show="total>0"
  65. :total="total"
  66. :page.sync="queryParamslist.pageNo"
  67. :limit.sync="queryParamslist.pageSize"
  68. @pagination="foremliseju"
  69. />
  70. </div>
  71. </el-collapse-item>
  72. </el-collapse>
  73. <BigPicture ref="BigPicture" :urls="pir_imgs"></BigPicture>
  74. </div>
  75. </div>
  76. </template>
  77. <script>
  78. import {
  79. getTableQuery,
  80. getObject,
  81. geteditindeTab,
  82. listIndex,
  83. delMenutabform,
  84. tableSubimt, tableSubimtanit, addbjectSave,
  85. getObjectqure
  86. } from '@/api/system/form.js'
  87. export default {
  88. name: "index",
  89. inject: ['reload'],
  90. data() {
  91. return {
  92. pir_imgs: '', // 图片链接
  93. num: 0,
  94. // 总条数
  95. total: 0,
  96. loading:true,
  97. tabList: {},
  98. currentPage3: 0,
  99. activeNames: [0,'lised'],
  100. title: '列表',
  101. objParams: {
  102. table: '',
  103. fixedData: {
  104. id: -1
  105. },
  106. isUi:true
  107. },
  108. objParamstue:{
  109. table: ''
  110. },
  111. queryData: {},
  112. queryDatatao:{},
  113. // 查询参数
  114. queryParams: {
  115. dictName: undefined,
  116. dictType: undefined,
  117. status: undefined
  118. },
  119. queryParamstwoi:{
  120. dictName: undefined,
  121. dictType: undefined,
  122. status: undefined
  123. },
  124. queryParamslist: {
  125. pageNo: 1,
  126. pageSize: 10,
  127. orderBy:'create_time desc',
  128. table: '',
  129. fixedData:{
  130. condition:{}
  131. }
  132. },
  133. labletit: '查询参数1233',
  134. surlable: '实际数据库表',
  135. postList: {},
  136. numtab: 0,
  137. tabldie:[],
  138. xidugje: '',
  139. tabShoes:false,//tab 显示隐藏
  140. tableZbietabg:{
  141. table:'sys_user'
  142. },
  143. forme:{
  144. table:'',
  145. fixedData:{}
  146. },
  147. formeanti:{
  148. table:'',
  149. commitData:[],
  150. },
  151. formy:{
  152. id:0,
  153. status:1
  154. },
  155. // 删除参数
  156. deledlid:{
  157. table:'',
  158. idList:[]
  159. },
  160. imgShoew:1,
  161. jeigneu: [],
  162. jeigneutwo: [],
  163. single: true,
  164. multiple: true,
  165. tabName:'',
  166. oieufr:'',
  167. cielsshow:false,
  168. foremTtae:'',
  169. foremTtaid:-1,
  170. ojeuduj:0,
  171. idtg:0
  172. };
  173. },
  174. filters:{
  175. btnConversion(val) {
  176. switch(val){
  177. case 'A':
  178. return '保存';
  179. case 'M':
  180. return '修改';
  181. case 'D':
  182. return '删除';
  183. case 'Q':
  184. return '查询';
  185. case 'S':
  186. return '提交';
  187. case 'U':
  188. return '反提交';
  189. case 'I':
  190. return '导入';
  191. case 'E':
  192. return '导出';
  193. }
  194. }
  195. },
  196. watch: {
  197. $route() {
  198. this.idtg= this.$route.query.id; //获取传来的参数
  199. }
  200. },
  201. mounted() {
  202. this.formeanti.table = this.$route.query.tables
  203. this.forme.table = this.$route.query.tables
  204. this.forme.objId = this.$route.query.id
  205. this.formy.id = this.$route.query.id
  206. this.oieufr = this.$route.query.id
  207. this.tableZbietabg.table = this.$route.query.tables
  208. this.objParams.table = this.$route.query.tables
  209. this.objParams.fixedData.id = this.$route.query.id
  210. this.ojeuduj = this.$route.query.id
  211. this.deledlid.table = this.$route.query.tables
  212. this.deledlid.idList.push(this.$route.query.id)
  213. this.queryParamslist.table = this.$route.query.tables
  214. if(this.$route.query.id == -1){
  215. console.log(this.$route.query.id)
  216. this.foremTtae = this.$route.query.tables+'_id'
  217. this.queryParamslist.fixedData.condition[this.foremTtae] = this.$route.query.id
  218. // this.cielsshow = true
  219. }else{
  220. let begad = this.$route.query.tables+'_id'
  221. this.queryParamslist.fixedData.condition[begad] = this.$route.query.id
  222. this.foremTtae = this.$route.query.tables+'_id'
  223. // this.cielsshow = false
  224. }
  225. // this.objParamstue.fixedData.id = this.$route.query.id
  226. this.init()
  227. this.edingelsietab()
  228. },
  229. destroyed(){
  230. },
  231. methods: {
  232. iChange(name,val){
  233. for(let item of this.queryData.showData){
  234. for(let itemChild of item.hrChildren){
  235. if(itemChild.columnName == name){
  236. itemChild.columnValue = (val?val:null)
  237. }
  238. }
  239. }
  240. },
  241. imgBtn(url) {
  242. this.pir_imgs = url
  243. this.$refs.BigPicture.hidden.status = true
  244. },
  245. modelFn(obj, cont) {
  246. this.$set(this.queryParams,obj,cont)
  247. },
  248. handleCurrentChange() {
  249. },
  250. handleSizeChange() {
  251. },
  252. headerBtn(item) {
  253. switch(item) {
  254. case 'A': {
  255. return
  256. }
  257. case 'M': {
  258. return
  259. }
  260. case 'D': {
  261. return
  262. }
  263. case 'Q': {
  264. return
  265. }
  266. case 'S': {
  267. return
  268. }
  269. case 'U': {
  270. return
  271. }
  272. case 'E': {
  273. return
  274. }
  275. }
  276. },
  277. init() {
  278. getObject(this.objParams).then(res => {
  279. let data = res.data
  280. this.queryData = data
  281. // 图片的显示隐藏
  282. if(this.queryData.showData.length !==0){
  283. this.queryData.showData.filter(route => {
  284. route.hrChildren.filter(routerst =>{
  285. if(this.queryData.table_column == undefined){
  286. this.queryData.table_column = null
  287. }
  288. routerst.tableColumnuy = this.queryData.table_column
  289. routerst.tableid = this.ojeuduj
  290. })
  291. if(route.cssClass !== null){
  292. this.imgShoew = route.cssClass
  293. if(route.cssClass == 2 || route.cssClass == 4){
  294. route.hrChildren.filter(routers =>{
  295. routers.isonliy = true
  296. })
  297. }else{
  298. route.hrChildren.filter(routers =>{
  299. routers.isonliy = false
  300. })
  301. }
  302. }
  303. })
  304. }
  305. if(this.xidugje == 'sx'){
  306. if(res.code == 200){
  307. this.msgSuccess("操作成功");
  308. }
  309. }
  310. })
  311. },
  312. // tab数据
  313. edingelsietab(){
  314. geteditindeTab(this.tableZbietabg).then(response => {
  315. if(response.data.ref.length !==0){
  316. this.tabldie = response.data.ref
  317. this.queryParamslist.table = this.tabldie[0].tableName
  318. this.objParamstue.table = this.tabldie[0].tableName
  319. this.tabName = this.tabldie[0].tableName
  320. this.tabShoes = true
  321. this.foremliseju()
  322. this.foremlisejuque()
  323. }else{
  324. this.tabShoes = false
  325. }
  326. });
  327. },
  328. // 列表数据
  329. foremliseju(){
  330. listIndex(this.queryParamslist).then(res => {
  331. let data = res.data
  332. this.postList = data
  333. this.loading = false
  334. this.total = res.data.total - 0
  335. })
  336. },
  337. // 列表查询接口
  338. foremlisejuque(){
  339. getObjectqure(this.objParamstue).then(res => {
  340. let data = res.data
  341. this.queryDatatao = res.data
  342. this.jeigneutwo = []
  343. this.jeigneu = []
  344. this.jeigneu = data.buttonList.split('')
  345. this.jeigneu.filter(route => {
  346. // route.dept_id = route.dept_id.value
  347. if (route == 'A') {
  348. route = '新增'
  349. this.jeigneutwo.push(route)
  350. } else if (route == 'M') {
  351. route = '修改'
  352. this.jeigneutwo.push(route)
  353. } else if (route == 'D') {
  354. route = '删除'
  355. // if (this.formy.id != -1) {
  356. this.jeigneutwo.push(route)
  357. // }
  358. } else if (route == 'Q') {
  359. route = '查询'
  360. this.jeigneutwo.push(route)
  361. } else if (route == 'S') {
  362. route = '提交'
  363. if (this.formy.id != -1) {
  364. this.jeigneutwo.push(route)
  365. }
  366. } else if (route == 'U') {
  367. route = '反提交'
  368. if (this.formy.id != -1) {
  369. this.jeigneutwo.push(route)
  370. }
  371. } else if (route == 'I') {
  372. route = '导入'
  373. this.jeigneutwo.push(route)
  374. } else if (route == 'E') {
  375. route = '导出'
  376. this.jeigneutwo.push(route)
  377. }
  378. })
  379. // 图片的显示隐藏
  380. })
  381. },
  382. // tab点击
  383. tabSbu(index) {
  384. this.num = index
  385. },
  386. enditTab(index) {
  387. this.numtab = index
  388. this.queryParamslist.table = this.tabldie[index].tableName
  389. this.tabName = this.tabldie[index].tableName
  390. this.objParamstue.table = this.tabldie[index].tableName
  391. this.foremliseju()
  392. this.foremlisejuque()
  393. },
  394. changeFn(obj) {
  395. for(let key in obj){
  396. this.queryParams[key] = obj[key]
  397. }
  398. },
  399. resetQuery() {
  400. },
  401. /** 搜索按钮操作 */
  402. handleQuery(index) {
  403. if(index == 'fh'){
  404. this.$store.dispatch("tagsView/delView", this.$route);
  405. console.log(this.idtg)
  406. this.$router.replace({ path: "/business/" + this.objParams.table });
  407. console.log()
  408. return
  409. }else if(index == 'sx'){
  410. this.xidugje = 'sx'
  411. this.reload()
  412. return
  413. }
  414. for(let item of this.queryData.showData){
  415. for(var i = 0 ; i < item.hrChildren.length ; i++){
  416. if(item.hrChildren[i].htmlType == 'checkbox'){
  417. this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
  418. }else if(item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload'){
  419. if(this.$refs[item.hrChildren[i].columnName][0].config.length){
  420. this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
  421. }
  422. } else if (item.hrChildren[i].htmlType == 'datetime') {
  423. if (this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]) {
  424. this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
  425. }else{
  426. this.queryParams[item.hrChildren[i].columnName] = null
  427. }
  428. } else{
  429. this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
  430. }
  431. }
  432. }
  433. if(index == 'D'){
  434. //删除
  435. this.handleDelete(this.deledlid)
  436. }else if(index == 'S'){
  437. //提交 保存
  438. this.formeanti.commitData = []
  439. this.formy.status = 1
  440. this.formeanti.commitData.push(this.formy)
  441. this.antiSubmission()
  442. }else if(index == 'U'){
  443. //反提交 保存
  444. this.formeanti.commitData = []
  445. this.formy.status = 2
  446. this.formeanti.commitData.push(this.formy)
  447. this.antiSubmission()
  448. }else if(index == 'M'){
  449. // 修改
  450. this.forme.fixedData = this.queryParams
  451. this.submitForm()
  452. }else if(index == 'A'){
  453. this.forme.fixedData = this.queryParams
  454. this.submitForm()
  455. }
  456. // this.getList();
  457. },
  458. // 搜索列表
  459. handleQueryiu(){
  460. for(let item of this.queryDatatao.queryList){
  461. if(item.htmlType == 'checkbox'){
  462. this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config
  463. }else if(item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload'){
  464. this.queryParamstwoi[item.columnName] = JSON.stringify(this.$refs[item.columnName][0].config)
  465. } else{
  466. this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
  467. }
  468. }
  469. for(var items in this.queryParamstwoi){
  470. if(this.queryParamstwoi[items] == ''){
  471. this.queryParamstwoi[items] = undefined
  472. }
  473. }
  474. this.queryParamstwoi[this.foremTtae] = this.oieufr
  475. this.queryParamslist.fixedData.condition = this.queryParamstwoi
  476. // this.queryParamslist.fixedData.condition[this.foremTtae] = this.oieufr
  477. this.foremliseju()
  478. },
  479. /** 新增 修改提交按钮 */
  480. submitForm: function() {
  481. this.$refs["queryForm"].validate(valid => {
  482. if (valid) {
  483. addbjectSave(this.forme).then(response => {
  484. this.msgSuccess("保存成功");
  485. if(this.formy.id == -1){
  486. if(response.code == 200){
  487. this.cielsshow = true;
  488. this.formy.id = response.data
  489. }else{
  490. this.cielsshow = false;
  491. }
  492. let query = Object.assign({'id':response.data,'tables': this.forme.table},{} )
  493. this.$router.push({ query})
  494. this.queryParamslist.fixedData.condition[this.foremTtae] = response.data
  495. this.deledlid.idList = []
  496. this.deledlid.idList.push(response.data)
  497. this.formy.id = response.data
  498. this.oieufr = response.data
  499. this.ojeuduj = response.data
  500. this.objParams.fixedData.id = response.data
  501. this.init()
  502. this.foremliseju()
  503. this.reload()
  504. }else{
  505. this.$store.dispatch("tagsView/delView", this.$route);
  506. this.$router.replace({ path: "/business/" + this.objParams.table });
  507. }
  508. });
  509. }
  510. });
  511. },
  512. // 提交反提交
  513. antiSubmission(){
  514. this.$refs["queryForm"].validate(valid => {
  515. if (valid) {
  516. if (this.formy.status == 1) {
  517. // 提交
  518. tableSubimt(this.formeanti).then(response => {
  519. this.msgSuccess("提交成功");
  520. this.$store.dispatch("tagsView/delView", this.$route);
  521. this.$router.replace({ path: "/business/" + this.objParams.table });
  522. // this.getList();
  523. });
  524. } else if(this.formy.status == 2){
  525. // 反提交
  526. tableSubimtanit(this.formeanti).then(response => {
  527. this.msgSuccess("反提交成功");
  528. this.$store.dispatch("tagsView/delView", this.$route);
  529. this.$router.replace({ path: "/business/" + this.objParams.table });
  530. // this.getList();
  531. });
  532. }
  533. }
  534. });
  535. },
  536. //删除
  537. handleDelete(index) {
  538. this.$confirm('是否确认删除', "警告", {
  539. confirmButtonText: "确定",
  540. cancelButtonText: "取消",
  541. type: "warning"
  542. }).then(function() {
  543. return delMenutabform(index);
  544. }).then(() => {
  545. // this.getList();
  546. this.msgSuccess("删除成功");
  547. this.$store.dispatch("tagsView/delView", this.$route);
  548. this.$router.replace({ path: "/business/" + this.objParams.table });
  549. })
  550. },
  551. // 列表删除
  552. handleDeletetwo(index){
  553. index.idList = this.ids
  554. index.table = this.tabName
  555. this.$confirm('是否确认删除', "警告", {
  556. confirmButtonText: "确定",
  557. cancelButtonText: "取消",
  558. type: "warning"
  559. }).then(function() {
  560. return delMenutabform(index);
  561. }).then(() => {
  562. this.foremliseju();
  563. this.msgSuccess("删除成功");
  564. // this.$router.go(-1)
  565. })
  566. },
  567. // 多选框选中数据
  568. handleSelectionChange(selection) {
  569. this.ids = selection.map(item => item.id)
  570. // console.log(this.ids)
  571. this.single = selection.length != 1
  572. this.multiple = !selection.length
  573. },
  574. handleQueryju(index){
  575. for (let item of this.queryData.showData) {
  576. for (var i = 0; i < item.hrChildren.length; i++) {
  577. if (item.hrChildren[i].htmlType == 'checkbox') {
  578. this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
  579. }else if(item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload'){
  580. if(this.$refs[item.hrChildren[i].columnName][0].config.length){
  581. this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
  582. }
  583. } else {
  584. this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[
  585. item.hrChildren[i].columnName]
  586. }
  587. }
  588. }
  589. if (this.queryParams.pageNum !== undefined) {
  590. this.queryParams.pageNum = undefined
  591. }
  592. if (this.queryParams.pageSize !== undefined) {
  593. this.queryParams.pageSize = undefined
  594. }
  595. if (index == '删除') {
  596. //删除
  597. this.handleDeletetwo(this.deledlid)
  598. } else if(index == '新增'){
  599. if(this.objParams.fixedData.id == -1){
  600. // console.log(this.objParams.fixedData.id,2334)
  601. if(this.cielsshow == true){
  602. this.routerFn(-1, this.tabName,this.oieufr,this.forme.table)
  603. }else{
  604. this.msgInfo('基本信息暂未保存')
  605. }
  606. }else{
  607. this.routerFn(-1, this.tabName,this.oieufr,this.forme.table)
  608. }
  609. }else if(index == '修改'){
  610. if (this.single) {
  611. this.msgInfo('请勾选一条信息')
  612. return
  613. }
  614. const id = this.ids.join(',')
  615. this.routerFn(id, this.tabName,this.oieufr,this.forme.table)
  616. }
  617. },
  618. routerFn(id, tables,tabfe, tabik) {
  619. // if (this.queryDatatao.viewType == 'crud') {
  620. this.$router.push({
  621. path: 'table',
  622. query: {
  623. id,
  624. tables,
  625. tabfe,
  626. tabik
  627. },
  628. })
  629. // } else if (this.queryDatatao.viewType == 'headTab') {
  630. // this.$router.push({
  631. // path: 'editing',
  632. // query: {
  633. // id,
  634. // tables,
  635. // tabfe,
  636. // tabik
  637. // },
  638. // })
  639. // }
  640. },
  641. },
  642. };
  643. </script>
  644. <style lang="scss">
  645. .tabForm {
  646. .hiueo{
  647. .el-form-item{
  648. margin-bottom: 0 !important;
  649. }
  650. }
  651. .el-collapse-item__content {
  652. padding: 0;
  653. }
  654. .table_nav {
  655. .el-collapse-item__wrap {
  656. border-bottom: 0;
  657. }
  658. .el-collapse-item__header {
  659. border-bottom: 0;
  660. font-size: 15px;
  661. font-family: PingFang SC;
  662. font-weight: bold;
  663. color: #3C8DBC;
  664. line-height: 36px;
  665. }
  666. // .el-form-item__content {
  667. // width: 55%;
  668. // }
  669. .el-collapse {
  670. border-top: 0;
  671. border: 0;
  672. }
  673. .el-divider--horizontal {
  674. margin-top: 0;
  675. }
  676. .eitde {
  677. background-color: #fff;
  678. border-radius: 6px;
  679. padding: 23px;
  680. padding-top: 0;
  681. margin-bottom: 10px;
  682. }
  683. }
  684. }
  685. .table_forem{
  686. .el-form--inline .el-form-item{
  687. width: 100% !important;
  688. }
  689. .el-select{
  690. width: 100%;
  691. }
  692. .el-date-editor.el-input{
  693. width: 100% !important;
  694. }
  695. .el-form-item--medium .el-form-item__content{
  696. width: 70%;
  697. }
  698. }
  699. </style>
  700. <style scoped lang="scss">
  701. .tabForm {
  702. background-color: #eef0ff;
  703. height: 100%;
  704. padding: 20px;
  705. p {
  706. margin: 0;
  707. }
  708. // 头部
  709. .tabForm_header {
  710. background-color: #fff;
  711. border-radius: 6px;
  712. padding: 13px;
  713. margin-bottom: 10px;
  714. position: relative;
  715. }
  716. // 内容
  717. .table_nav {
  718. // background-color: #fff;
  719. // border-radius: 6px;
  720. // padding: 23px;
  721. .ppl {
  722. display: flex;
  723. height: 38px;
  724. p {
  725. position: relative;
  726. width: 113px;
  727. height: 38px;
  728. img {
  729. position: absolute;
  730. top: 0;
  731. left: 0;
  732. width: 100%;
  733. height: 100%;
  734. // z-index: -1;
  735. }
  736. span {
  737. width: 100%;
  738. position: absolute;
  739. top: 0;
  740. left: 0;
  741. // transform: translate(-50%);
  742. text-align: center;
  743. line-height: 38px;
  744. font-size: 15px;
  745. font-family: PingFang SC;
  746. font-weight: bold;
  747. color: #aaa;
  748. }
  749. .span {
  750. color: #3C8DBC;
  751. }
  752. }
  753. }
  754. }
  755. }
  756. // tab
  757. .index_headetab {
  758. display: flex;
  759. border-bottom: 1px solid #E5E5E5;
  760. height: 53px;
  761. // padding-top: 20px;
  762. padding-bottom: 10px;
  763. margin-bottom: 20px !important;
  764. span {
  765. width: 70px;
  766. text-align: center;
  767. line-height: 53px;
  768. height: 53px;
  769. font-size: 15px;
  770. font-family: PingFang SC;
  771. font-weight: bold;
  772. color: #666;
  773. position: relative;
  774. // flex: 1;
  775. // border-bottom: ;
  776. }
  777. .span {
  778. content: '';
  779. display: block;
  780. width: 18px;
  781. height: 8px;
  782. border-radius: 3px;
  783. background-color: #3C8DBC;
  784. color: #3C8DBC !important;
  785. // position: absolute;
  786. // border-bottom: ;
  787. }
  788. .spanto {
  789. color: #3C8DBC;
  790. border-bottom: 3px solid #3C8DBC;
  791. }
  792. }
  793. .imge_tab{
  794. position: absolute;
  795. right: 0;
  796. top: 5px;
  797. }
  798. </style>