|  | @@ -1,30 +1,26 @@
 | 
	
		
			
				|  |  |  <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>
 | 
	
		
			
				|  |  | +    <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" v-model="form">
 | 
	
		
			
				|  |  | +      <template slot-scope="{type,disabled}" slot="isEnableForm">
 | 
	
		
			
				|  |  | +        <el-switch v-model="form.isEnable" :active-value="1" :inactive-value="0" />
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  | +    </avue-crud>
 | 
	
		
			
				|  |  |    </basic-container>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import {customerList,jdmoduleDelete, jdmoduleSave, jdmoduleUpdate} from "@/api/system/configurationLedger";
 | 
	
		
			
				|  |  | +import { customerList, jdmoduleDelete, jdmoduleSave, jdmoduleUpdate } from "@/api/system/configurationLedger";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "configurationLedger",
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      data:[],
 | 
	
		
			
				|  |  | +      data: [],
 | 
	
		
			
				|  |  | +      form: {},
 | 
	
		
			
				|  |  |        page: {
 | 
	
		
			
				|  |  |          size: 10,
 | 
	
		
			
				|  |  | -        current:1
 | 
	
		
			
				|  |  | +        current: 1
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        option: {
 | 
	
		
			
				|  |  |          index: true,
 | 
	
	
		
			
				|  | @@ -42,43 +38,54 @@ export default {
 | 
	
		
			
				|  |  |                label: "tenantName",
 | 
	
		
			
				|  |  |                value: "tenantId"
 | 
	
		
			
				|  |  |              },
 | 
	
		
			
				|  |  | -            search:true,
 | 
	
		
			
				|  |  | +            search: true,
 | 
	
		
			
				|  |  |              rules: [{
 | 
	
		
			
				|  |  |                required: true,
 | 
	
		
			
				|  |  |                message: " ",
 | 
	
		
			
				|  |  |                trigger: "click"
 | 
	
		
			
				|  |  |              }]
 | 
	
		
			
				|  |  | -          },{
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  |              label: '账户名称',
 | 
	
		
			
				|  |  |              prop: 'accountName',
 | 
	
		
			
				|  |  | -            search:true
 | 
	
		
			
				|  |  | -          },{
 | 
	
		
			
				|  |  | +            search: true
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  |              label: '客户ID',
 | 
	
		
			
				|  |  |              prop: 'clientId'
 | 
	
		
			
				|  |  | -          },{
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  |              label: '客户密钥',
 | 
	
		
			
				|  |  |              prop: 'clientSecret'
 | 
	
		
			
				|  |  | -          },{
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  |              label: '客户帐号',
 | 
	
		
			
				|  |  |              prop: 'username'
 | 
	
		
			
				|  |  | -          },{
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  |              label: '帐号密码',
 | 
	
		
			
				|  |  |              prop: 'password'
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  | +            label: '是否启用',
 | 
	
		
			
				|  |  | +            prop: 'isEnable',
 | 
	
		
			
				|  |  | +            formatter: (val, value, label) => {
 | 
	
		
			
				|  |  | +              console.log(val, value, label)
 | 
	
		
			
				|  |  | +              if (value == '1') {
 | 
	
		
			
				|  |  | +                return '是'
 | 
	
		
			
				|  |  | +              } else {
 | 
	
		
			
				|  |  | +                return '否'
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          ]
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  methods:{
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  |      //列表查询
 | 
	
		
			
				|  |  | -    onLoad(page,params) {
 | 
	
		
			
				|  |  | -      customerList({...params,size: page.size,current: page.current}).then(res=>{
 | 
	
		
			
				|  |  | +    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(){
 | 
	
		
			
				|  |  | +    refreshChange() {
 | 
	
		
			
				|  |  |        this.onLoad(this.page);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //表单搜索按钮触发
 | 
	
	
		
			
				|  | @@ -89,7 +96,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //新增
 | 
	
		
			
				|  |  |      rowSave(row, done, loading) {
 | 
	
		
			
				|  |  | -      jdmoduleSave(row).then(()=>{
 | 
	
		
			
				|  |  | +      jdmoduleSave(row).then(() => {
 | 
	
		
			
				|  |  |          this.$message.success('新增成功');
 | 
	
		
			
				|  |  |          this.onLoad(this.page);
 | 
	
		
			
				|  |  |          loading()
 | 
	
	
		
			
				|  | @@ -98,7 +105,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //编辑
 | 
	
		
			
				|  |  |      rowUpdate(row, index, done, loading) {
 | 
	
		
			
				|  |  | -      jdmoduleUpdate(row).then(()=>{
 | 
	
		
			
				|  |  | +      jdmoduleUpdate(row).then(() => {
 | 
	
		
			
				|  |  |          this.$message.success('修改成功');
 | 
	
		
			
				|  |  |          this.onLoad(this.page);
 | 
	
		
			
				|  |  |          loading()
 | 
	
	
		
			
				|  | @@ -106,8 +113,8 @@ export default {
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //删除
 | 
	
		
			
				|  |  | -    rowDel(row, index, done){
 | 
	
		
			
				|  |  | -      jdmoduleDelete(row.id).then(()=>{
 | 
	
		
			
				|  |  | +    rowDel(row, index, done) {
 | 
	
		
			
				|  |  | +      jdmoduleDelete(row.id).then(() => {
 | 
	
		
			
				|  |  |          this.$message.success('删除成功');
 | 
	
		
			
				|  |  |          done()
 | 
	
		
			
				|  |  |        })
 | 
	
	
		
			
				|  | @@ -117,5 +124,4 @@ export default {
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <style scoped>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  </style>
 |