| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import request from '@/router/axios';
- export const getList = (current, size, params) => {
- return request({
- url: '/api/bank/autostruct/list',
- method: 'get',
- params: {
- ...params,
- current,
- size,
- }
- })
- }
- export const getDetail = (id) => {
- return request({
- url: '/api/bank/autostruct/detail',
- method: 'get',
- params: {
- id
- }
- })
- }
- export const remove = (ids) => {
- return request({
- url: '/api/bank/autostruct/remove',
- method: 'post',
- params: {
- ids,
- }
- })
- }
- export const add = (row) => {
- return request({
- url: '/api/bank/autostruct/submit',
- method: 'post',
- data: row
- })
- }
- export const update = (row) => {
- return request({
- url: '/api/bank/autostruct/submit',
- method: 'post',
- data: row
- })
- }
- export const opStr2opObj = (optionStr) => {
- optionStr = optionStr.replace(/(s*?{s*?|s*?,s*?)(['"])?([a-zA-Z0-9]+)(['"])?:/g, '$1"$3":');
- optionStr = optionStr.replace(/\'/ig,"\"")
- optionStr = optionStr.replace(/>/ig,">")
- optionStr = optionStr.replace(/\s*/g, '')
- // str.replace(/\s*/g,"")
- let optionObj = JSON.parse(optionStr, (k,v)=>{
- if(k == 'change'){
- return eval('"' + v + '"')
- }
- return v
- })
- return optionObj;
- }
|