123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <basic-container>
- <avue-crud
- :data="data"
- :option="option"
- :page.sync="page"
- @on-load="onLoad"
- @row-del="rowDel"
- @row-save="rowSave"
- @row-update="rowUpdate"
- @search-change="searchChange"
- @refresh-change="refreshChange"
- ></avue-crud>
- </basic-container>
- </template>
- <script>
- import {customerList,jdmoduleDelete, jdmoduleSave, jdmoduleUpdate} from "@/api/system/configurationLedger";
- export default {
- name: "configurationLedger",
- data() {
- return {
- data:[],
- page: {
- size: 10,
- current:1
- },
- option: {
- index: true,
- searchMenuPosition: "right",
- searchMenuSpan: 12,
- align: 'center',
- menuAlign: 'center',
- column: [
- {
- label: "所属租户",
- prop: "tenantId",
- type: "tree",
- dicUrl: "/api/blade-system/tenant/select",
- props: {
- label: "tenantName",
- value: "tenantId"
- },
- search:true,
- rules: [{
- required: true,
- message: " ",
- trigger: "click"
- }]
- },{
- label: '账户名称',
- prop: 'accountName',
- search:true
- },{
- label: '客户ID',
- prop: 'clientId'
- },{
- label: '客户密钥',
- prop: 'clientSecret'
- },{
- label: '客户帐号',
- prop: 'username'
- },{
- label: '帐号密码',
- prop: 'password'
- }
- ]
- }
- }
- },
- methods:{
- //列表查询
- onLoad(page,params) {
- customerList({...params,size: page.size,current: page.current}).then(res=>{
- this.data = res.data.data.records
- this.page.total = res.data.data.total
- })
- },
- //刷新按钮触发
- refreshChange(){
- this.onLoad(this.page);
- },
- //表单搜索按钮触发
- searchChange(params, done) {
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done()
- },
- //新增
- rowSave(row, done, loading) {
- jdmoduleSave(row).then(()=>{
- this.$message.success('新增成功');
- this.onLoad(this.page);
- loading()
- done()
- })
- },
- //编辑
- rowUpdate(row, index, done, loading) {
- jdmoduleUpdate(row).then(()=>{
- this.$message.success('修改成功');
- this.onLoad(this.page);
- loading()
- done()
- })
- },
- //删除
- rowDel(row, index, done){
- jdmoduleDelete(row.id).then(()=>{
- this.$message.success('删除成功');
- done()
- })
- }
- }
- }
- </script>
- <style scoped>
- </style>
|