300b0cda191ae1bf47fb3b6d8f3dcbbb80ae2a95.svn-base 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. <template>
  2. <div class="app-container">
  3. <div class="operation">
  4. <el-button v-if="isRoleEdit" class="success" @click="handleCreate">新增</el-button>
  5. </div>
  6. <div class="search">
  7. <el-input v-model="tab2.table.getdataListParm.parammaps.pastureName" placeholder="牧场名称" style="width: 180px;" class="filter-item" clearable />
  8. <el-select v-model="tab2.table.getdataListParm.parammaps.enable" placeholder="状态" class="filter-item" style="width: 120px;" clearable>
  9. <el-option v-for="item in stateList" :key="item.id" :label="item.name" :value="item.id" />
  10. </el-select>
  11. <el-select v-model="tab2.table.getdataListParm.parammaps.statue" placeholder="是否归属集团" class="filter-item" style="width: 120px;" clearable>
  12. <el-option v-for="item in isBelongGroupList" :key="item.id" :label="item.name" :value="item.id" />
  13. </el-select>
  14. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  15. <el-button class="successBorder" @click="handleRefresh">重置</el-button>
  16. </div>
  17. <div class="table">
  18. <el-table
  19. :key="tab2.table.tableKey"
  20. v-loading="tab2.table.listLoading"
  21. element-loading-text="给我一点时间"
  22. :data="tab2.table.list"
  23. border
  24. fit
  25. highlight-current-row
  26. style="width: 100%;"
  27. :row-style="rowStyle"
  28. :cell-style="cellStyle"
  29. class="elTable table-fixed"
  30. >
  31. <el-table-column label="序号" align="center" type="index" width="50px">
  32. <template slot-scope="scope">
  33. <span>{{ scope.$index + (tab2.table.pageNum-1) * tab2.table.pageSize + 1 }}</span>
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="牧场ID" min-width="130px" align="center">
  37. <template slot-scope="scope">
  38. <span v-if="scope.row.NoEdit">{{ scope.row.pasturecode }}</span>
  39. <el-input v-if="scope.row.Edit" v-model="scope.row.pasturecode" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="牧场名称" min-width="130px" align="center">
  43. <template slot-scope="scope">
  44. <span v-if="scope.row.NoEdit">{{ scope.row.pasturename }}</span>
  45. <el-input v-if="scope.row.Edit" v-model="scope.row.pasturename" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="管理员用户名" min-width="130px" align="center">
  49. <template slot-scope="scope">
  50. <span v-if="scope.row.NoEdit">{{ scope.row.user }}</span>
  51. <el-input v-if="scope.row.Edit" v-model="scope.row.user" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="状态" min-width="110px" align="center">
  55. <template slot-scope="scope">
  56. <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="权限归属" min-width="130px" align="center">
  60. <template slot-scope="scope">
  61. <span v-if="scope.row.NoEdit">{{ scope.row.groupsname }}</span>
  62. <el-select v-if="scope.row.Edit" v-model="scope.row.groupsid" :clearable="false" filterable placeholder="权限归属" class="filter-item" style="width: 120px;" clearable>
  63. <el-option v-for="item in belongGroupList" :key="item.id" :label="item.groupsname" :value="item.id" />
  64. </el-select>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="备注" min-width="130px" align="center">
  68. <template slot-scope="scope">
  69. <span v-if="scope.row.NoEdit">{{ scope.row.note }}</span>
  70. <el-input v-if="scope.row.Edit" v-model="scope.row.note" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
  74. <template slot-scope="{row}">
  75. <!-- 页面权限 -->
  76. <el-button v-if="row.NoEdit && isRoleEdit" class="miniSuccess" @click="handlePageConfiguration(row)">页面配置</el-button>
  77. <!-- 新增 -->
  78. <el-button v-if="row.isCreate && isRoleEdit" class="miniSuccess" :disabled="isokDisable" @click="createData(row)">保存</el-button>
  79. <el-button v-if="row.isCreate && isRoleEdit" class="minCancel" @click="createCancel(row)">取消</el-button>
  80. <!-- 编辑 -->
  81. <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" @click="handleUpdate(row)">编辑</el-button>
  82. <!-- 编辑保存 -->
  83. <el-button v-if="row.isUpdateSave && isRoleEdit" class="miniSuccess" :disabled="isokDisable" @click="updateData(row)">保存</el-button>
  84. <el-button v-if="row.isUpdateSave && isRoleEdit" class="minCancel" @click="updateCancel(row)">取消</el-button>
  85. </template>
  86. </el-table-column>
  87. </el-table>
  88. <pagination v-show="tab2.table.total>=0" :total="tab2.table.total" :page.sync="tab2.table.getdataListParm.offset" :limit.sync="tab2.table.getdataListParm.pagecount" @pagination="getList" />
  89. </div>
  90. <!-- 页面配置 -->
  91. <el-dialog :title="textMap[tab1.pageConfiguration.dialogStatus]" :visible.sync="tab1.pageConfiguration.dialogFormVisible" :close-on-click-modal="false" width="25%">
  92. <div style="height: 400px;overflow-y: auto;">
  93. <el-tree
  94. ref="tree"
  95. v-loading="tab1.pageConfiguration.listLoading"
  96. show-checkbox
  97. node-key="id"
  98. :default-expand-all="true"
  99. :data="tab1.pageConfiguration.data"
  100. :props="tab1.pageConfiguration.defaultProps"
  101. :default-checked-keys="tab1.pageConfiguration.defaultCheckedKeys"
  102. @check-change="handelCheckChange"
  103. />
  104. </div>
  105. <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:5px">
  106. <el-button @click="tab1.pageConfiguration.dialogFormVisible = false;getList(); ">取消</el-button>
  107. <el-button type="success" :disabled="isokDisable" @click="pageConfigurationData()">确认</el-button>
  108. </div>
  109. </el-dialog>
  110. </div>
  111. </template>
  112. <script>
  113. import { GetDataByName, GetDataByNames, failproccess, transData, ExecDataByConfig, checkButtons } from '@/api/common'
  114. import Cookies from 'js-cookie'
  115. import Pagination from '@/components/Pagination'
  116. export default {
  117. name: 'OperationManagement',
  118. components: { Pagination },
  119. data() {
  120. return {
  121. requestParams: [
  122. { name: 'getGroupsAllList', offset: 0, pagecount: 0, parammaps: {}}
  123. ],
  124. isRoleEdit: [],
  125. stateList: [{ id: 1, name: '启用' }, { id: 0, name: '禁止' }], // 状态
  126. isBelongGroupList: [{ id: 1, name: '是' }, { id: 0, name: '否' }], // 是否归属集团
  127. belongGroupList: [], // 权限归属
  128. tab1: {
  129. // 页面配置
  130. pageConfiguration: {
  131. dialogFormVisible: false,
  132. dialogStatus: '',
  133. temp: {},
  134. listLoading: true,
  135. getdataListParm: {
  136. name: 'getMenuandButtonlistMC'
  137. },
  138. parentType: [],
  139. defaultProps: {
  140. children: 'children',
  141. label: 'name'
  142. },
  143. defaultCheckedKeys: [],
  144. arrList: []
  145. }
  146. },
  147. tab2: {
  148. table: {
  149. getdataListParm: {
  150. name: 'groupsrelationlistMCAll',
  151. page: 1,
  152. offset: 1,
  153. pagecount: 10,
  154. returntype: 'Map',
  155. parammaps: {
  156. pastureName: '',
  157. enable: '',
  158. statue: ''
  159. }
  160. },
  161. tableKey: 0,
  162. list: [],
  163. total: 0,
  164. listLoading: true,
  165. temp: {}
  166. },
  167. // 页面配置
  168. pageConfiguration: {
  169. temp: {}
  170. }
  171. },
  172. requestParam: {},
  173. rules: {},
  174. isokDisable: false,
  175. textMap: {
  176. pageConfiguration: '页面配置',
  177. relation: '关联'
  178. },
  179. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  180. cellStyle: { padding: 0 + 'px' }
  181. }
  182. },
  183. created() {
  184. this.getList()
  185. this.getButtons()
  186. this.getDownList()
  187. },
  188. methods: {
  189. getButtons() {
  190. const Edit = 'Role'
  191. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  192. this.isRoleEdit = isRoleEdit
  193. },
  194. getDownList() {
  195. GetDataByNames(this.requestParams).then(response => {
  196. this.belongGroupList = response.data.getGroupsAllList.list
  197. })
  198. },
  199. handleEnableChange() {
  200. console.log('点击了是否启用')
  201. },
  202. handleSearch() {
  203. console.log('点击了查询')
  204. this.tab2.table.getdataListParm.offset = 1
  205. this.getList()
  206. },
  207. handleRefresh() {
  208. console.log('点击了重置')
  209. this.tab2.table.getdataListParm.parammaps.pastureName = ''
  210. this.tab2.table.getdataListParm.parammaps.statue = ''
  211. this.tab2.table.getdataListParm.parammaps.enable = ''
  212. this.tab2.table.getdataListParm.offset = 1
  213. this.getList()
  214. },
  215. createCancel(row) {
  216. console.log('点击了牧场新增取消')
  217. for (let i = 0; i < this.tab2.table.list.length; i++) {
  218. if (row.myId === this.tab2.table.list[i].myId) {
  219. var listIndex2 = this.tab2.table.list.indexOf(this.tab2.table.list[i])
  220. }
  221. if (listIndex2 > -1) {
  222. this.tab2.table.list.splice(listIndex2, 1)
  223. return
  224. }
  225. }
  226. },
  227. updateCancel(row) {
  228. console.log('点击了编辑取消')
  229. // 编辑false,不可编辑true
  230. row.Edit = false
  231. row.NoEdit = true
  232. // 新增false,编辑true,编辑保存false
  233. row.isCreate = false
  234. row.isUpdate = true
  235. row.isUpdateSave = false
  236. this.getList()
  237. },
  238. getPageConfigurationList() {
  239. this.tab1.pageConfiguration.getdataListParm.parammaps = {}
  240. this.tab1.pageConfiguration.getdataListParm.parammaps.pastureid = this.tab2.pageConfiguration.temp.pastureid
  241. this.tab1.pageConfiguration.getdataListParm.parammaps.id = this.tab1.pageConfiguration.temp.id
  242. this.tab1.pageConfiguration.listLoading = true
  243. this.tab1.pageConfiguration.defaultCheckedKeys = []
  244. GetDataByName(this.tab1.pageConfiguration.getdataListParm).then(response => {
  245. if (response.data.list !== null) {
  246. for (let i = 0; i < response.data.list.length; i++) {
  247. if (parseFloat(response.data.list[i].seebutton) > 0 && response.data.list[i].pid !== -1) {
  248. this.tab1.pageConfiguration.defaultCheckedKeys.push(String(response.data.list[i].menu_id))
  249. }
  250. if (parseFloat(response.data.list[i].seebutton) > 0) {
  251. this.tab1.pageConfiguration.arrList.push(String(response.data.list[i].menu_id))
  252. }
  253. }
  254. this.tab1.pageConfiguration.data = transData(response.data.list, 'id', 'pid', 'children')
  255. console.log(this.tab1.pageConfiguration.data)
  256. console.log(response.data.list)
  257. } else {
  258. this.tab1.pageConfiguration.data = []
  259. }
  260. setTimeout(() => {
  261. this.tab1.pageConfiguration.listLoading = false
  262. }, 1000)
  263. })
  264. },
  265. handelCheckChange(id) {
  266. // this.tab1.pageConfiguration.defaultCheckedKeys = this.$refs.tree.getCheckedKeys()
  267. var checkedKeys = this.$refs.tree.getCheckedKeys()
  268. var options = checkedKeys.map((item) => {
  269. var node = this.$refs.tree.getNode(item) // 所有被选中的节点对应的node
  270. const tmpMap = {}
  271. console.log(node, 'node')
  272. tmpMap.pid = node.parent.key
  273. tmpMap.value = node.key
  274. return tmpMap
  275. })
  276. var selectedData = options.map((item) => {
  277. console.log(item)
  278. return item
  279. })
  280. console.log(selectedData)
  281. var arr = []
  282. for (let i = 0; i < selectedData.length; i++) {
  283. if (selectedData[i].pid !== undefined) {
  284. arr.push(selectedData[i].pid, selectedData[i].value)
  285. } else {
  286. arr.push(selectedData[i].value)
  287. }
  288. }
  289. this.tab1.pageConfiguration.arrList = this.unique(arr)
  290. // this.tab1.pageConfiguration.defaultCheckedKeys = this.unique(arr)
  291. },
  292. unique(arr) {
  293. return Array.from(new Set(arr))
  294. },
  295. handlePageConfiguration(row) {
  296. this.tab2.pageConfiguration.temp = Object.assign({}, row)
  297. console.log('点击了行内页面配置')
  298. this.tab1.pageConfiguration.dialogStatus = 'pageConfiguration'
  299. this.tab1.pageConfiguration.dialogFormVisible = true
  300. this.tab1.pageConfiguration.defaultCheckedKeys = []
  301. this.getPageConfigurationList()
  302. },
  303. pageConfigurationData() {
  304. console.log('牧场页面配置保存')
  305. this.isokDisable = true
  306. setTimeout(() => {
  307. this.isokDisable = false
  308. }, 1000)
  309. this.requestParam = {}
  310. this.requestParam.common = { 'returnmap': '0' }
  311. this.requestParam.data = []
  312. this.requestParam.data[0] = { 'name': 'deletemenuPastureMC', 'type': 'e', 'parammaps': {
  313. 'id': this.tab2.pageConfiguration.temp.id
  314. }}
  315. var list = []
  316. for (let i = 0; i < this.tab1.pageConfiguration.arrList.length; i++) {
  317. list.push({ 'id': this.tab1.pageConfiguration.arrList[i] })
  318. }
  319. this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': list }}
  320. this.requestParam.data[1].children = []
  321. this.requestParam.data[1].children[0] = { 'name': 'insertRolepastureMC', 'type': 'e', 'parammaps': {
  322. menuid: '@insertSpotList.id',
  323. id: this.tab2.pageConfiguration.temp.id
  324. }}
  325. ExecDataByConfig(this.requestParam).then(response => {
  326. console.log('页面配置保存发送参数', this.requestParam)
  327. if (response.msg !== 'fail') {
  328. this.tab1.pageConfiguration.dialogFormVisible = false
  329. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  330. this.getList()
  331. } else {
  332. failproccess(response, this.$notify)
  333. }
  334. })
  335. },
  336. getList() {
  337. this.tab2.table.listLoading = true
  338. GetDataByName(this.tab2.table.getdataListParm).then(response => {
  339. console.log('table数据', response.data.list)
  340. if (response.data.list !== null) {
  341. for (let i = 0; i < response.data.list.length; i++) {
  342. this.$set(response.data.list[i], 'Edit', false) // 编辑
  343. this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
  344. this.$set(response.data.list[i], 'isCreate', false) // 新增操作
  345. this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
  346. this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
  347. }
  348. this.tab2.table.list = response.data.list
  349. this.tab2.table.pageNum = response.data.pageNum
  350. this.tab2.table.pageSize = response.data.pageSize
  351. this.tab2.table.total = response.data.total
  352. } else {
  353. this.tab2.table.list = []
  354. }
  355. setTimeout(() => {
  356. this.tab2.table.listLoading = false
  357. }, 100)
  358. })
  359. },
  360. handleCreate() {
  361. console.log('点击了牧场新增')
  362. // 编辑true/不可编辑false
  363. // 新增操true,编辑false,编辑保存false
  364. for (let i = 0; i < this.tab2.table.list.length; i++) {
  365. if (this.tab2.table.list[i].Edit == true) {
  366. this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
  367. return false
  368. }
  369. }
  370. this.tab2.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'pasturecode': '', 'phone': '', 'contact': '', 'address': '', 'pasturename': '', 'group': '', 'groupsid': '', 'pasturecode': '' })
  371. },
  372. createData(row) {
  373. console.log('点击了牧场新增保存', row)
  374. // 检验牧场ID/牧场名称是否为空
  375. if (row.pasturecode == '' && row.pasturename == '' && row.user == '') {
  376. this.$message({ type: 'error', message: '牧场ID/牧场名称/管理员用户名不能为空', duration: 2000 })
  377. return false
  378. } else if (row.pasturename == '' && row.user == '') {
  379. this.$message({ type: 'error', message: '牧场名称/管理员用户名不能为空', duration: 2000 })
  380. return false
  381. } else if (row.pasturecode == '') {
  382. this.$message({ type: 'error', message: '牧场ID不能为空', duration: 2000 })
  383. return false
  384. } else if (row.pasturename == '') {
  385. this.$message({ type: 'error', message: '牧场名称不能为空', duration: 2000 })
  386. return false
  387. } else if (row.user == '') {
  388. this.$message({ type: 'error', message: '管理员用户名不能为空', duration: 2000 })
  389. return false
  390. }
  391. this.isokDisable = true
  392. setTimeout(() => {
  393. this.isokDisable = false
  394. }, 1000)
  395. this.requestParam = {}
  396. this.requestParam.common = { 'returnmap': '0' }
  397. this.requestParam.data = []
  398. this.requestParam.data[0] = { 'name': 'checkuser', 'type': 'v', 'parammaps': {
  399. 'user': row.user
  400. }}
  401. this.requestParam.data[1] = { 'name': 'insertPasture', 'type': 'e', 'parammaps': {
  402. 'pasturecode': row.pasturecode,
  403. 'pasturename': row.pasturename,
  404. 'groupsid': row.groupsid,
  405. 'user': row.user,
  406. 'note': row.note,
  407. 'enable': row.enable,
  408. 'emp': row.emp,
  409. 'phone': row.phone,
  410. 'address': row.address
  411. }}
  412. this.requestParam.data[2] = { 'name': 'createNewPasture', 'type': 'e', 'parammaps': {
  413. 'user': row.user,
  414. 'pastureid': '@insertPasture.LastInsertId',
  415. 'type': '0'
  416. }}
  417. ExecDataByConfig(this.requestParam).then(response => {
  418. console.log('新增保存发送参数', this.requestParam)
  419. if (response.msg !== 'fail') {
  420. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  421. this.getList()
  422. } else {
  423. const tId = new RegExp("column 'id'")
  424. if (tId.test(response.data)) {
  425. this.$notify({ title: '保存失败', message: '集团已存在,不可重复生成', type: 'warning', duration: 2000 })
  426. } else {
  427. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  428. }
  429. }
  430. })
  431. },
  432. handleUpdate(row) {
  433. console.log('点击了牧场编辑', row)
  434. for (let i = 0; i < this.tab2.table.list.length; i++) {
  435. if (this.tab2.table.list[i].Edit == true) {
  436. this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
  437. return false
  438. }
  439. }
  440. // 编辑true,不可编辑false
  441. row.Edit = true
  442. row.NoEdit = false
  443. // 新增false,编辑false,编辑保存true
  444. row.isCreate = false
  445. row.isUpdate = false
  446. row.isUpdateSave = true
  447. if (row.groupsid !== undefined) {
  448. row.groupsid = String(row.groupsid)
  449. }
  450. },
  451. updateData(row) {
  452. console.log('点击了牧场编辑保存')
  453. // 检验牧场ID/牧场名称是否为空
  454. if (row.pasturecode == '' && row.pasturename == '' && row.user == '') {
  455. this.$message({ type: 'error', message: '牧场ID/牧场名称/管理员用户名不能为空', duration: 2000 })
  456. return false
  457. } else if (row.pasturename == '' && row.user == '') {
  458. this.$message({ type: 'error', message: '牧场名称/管理员用户名不能为空', duration: 2000 })
  459. return false
  460. } else if (row.pasturecode == '') {
  461. this.$message({ type: 'error', message: '牧场ID不能为空', duration: 2000 })
  462. return false
  463. } else if (row.pasturename == '') {
  464. this.$message({ type: 'error', message: '牧场名称不能为空', duration: 2000 })
  465. return false
  466. } else if (row.user == '') {
  467. this.$message({ type: 'error', message: '管理员用户名不能为空', duration: 2000 })
  468. return false
  469. }
  470. this.isokDisable = true
  471. setTimeout(() => {
  472. this.isokDisable = false
  473. }, 1000)
  474. this.requestParam = {}
  475. this.requestParam.common = { 'returnmap': '0' }
  476. this.requestParam.data = []
  477. this.requestParam.data[0] = { 'name': 'updatePasture', 'type': 'e', 'parammaps': {
  478. 'id': row.id,
  479. 'pasturecode': row.pasturecode,
  480. 'pasturename': row.pasturename,
  481. 'groupsid': row.groupsid,
  482. 'user': row.user,
  483. 'note': row.note,
  484. 'enable': row.enable,
  485. 'emp': row.emp,
  486. 'phone': row.phone,
  487. 'address': row.address
  488. }}
  489. this.requestParam.data[1] = { 'name': 'updateUserName', 'type': 'e', 'parammaps': {
  490. 'id': row.id,
  491. 'userold': row.userold,
  492. 'user': row.user
  493. }}
  494. ExecDataByConfig(this.requestParam).then(response => {
  495. console.log('编辑保存发送参数', this.requestParam)
  496. if (response.msg !== 'fail') {
  497. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  498. this.getList()
  499. } else {
  500. const tId = new RegExp("column 'id'")
  501. if (tId.test(response.data)) {
  502. this.$notify({ title: '保存失败', message: '集团已存在,不可重复生成', type: 'warning', duration: 2000 })
  503. } else {
  504. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  505. }
  506. }
  507. })
  508. }
  509. }
  510. }
  511. </script>
  512. <style lang="scss" scoped>
  513. .search{margin-top:10px;}
  514. .table{margin-top:10px;}
  515. .inside-base {
  516. position: relative;
  517. }
  518. .inside-base-main {
  519. width: 100%;
  520. background: #ffffff;
  521. box-shadow: 0px 0px 10px 0px rgba(231,232,238,1);
  522. border-radius: 4px;
  523. margin-bottom: 30px;
  524. }
  525. // 中间内容
  526. .inside-base-cont {
  527. margin: 0 20px;
  528. }
  529. .role-cont {
  530. position: relative;
  531. font-size: 16px;
  532. color: #333333;
  533. line-height: 40px;
  534. > span {
  535. width: 90px;
  536. height: 40px;
  537. text-align: right;
  538. float: left;
  539. margin-right: 10px;
  540. margin-bottom: 20px;
  541. }
  542. > div {
  543. position: relative;
  544. width: 100%;
  545. float: left;
  546. margin-bottom: 20px;
  547. >>> .el-input__inner {
  548. width: 320px;
  549. }
  550. }
  551. }
  552. .check-page-all {
  553. position: absolute;
  554. top: 13px;
  555. left: 11px;
  556. z-index: 99;
  557. }
  558. /* element-ui css */
  559. .inside-base {
  560. >>> .el-input__inner {
  561. font-size: 16px;
  562. color: #333333;
  563. }
  564. }
  565. </style>