|
@ -2,7 +2,14 @@ |
|
|
<div> |
|
|
<div> |
|
|
<!--工具栏--> |
|
|
<!--工具栏--> |
|
|
<div class="head-container"> |
|
|
<div class="head-container"> |
|
|
<crudOperation :permission="permission" /> |
|
|
|
|
|
|
|
|
<crudOperation :permission="permission"> |
|
|
|
|
|
<template v-slot:right> |
|
|
|
|
|
<el-button :loading="crud.downloadLoading" size="mini" @click="doExport(crud.selections)"> |
|
|
|
|
|
<i class="iconfont icon-daochu" /> |
|
|
|
|
|
全部导出 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</crudOperation> |
|
|
</div> |
|
|
</div> |
|
|
<!--表格渲染--> |
|
|
<!--表格渲染--> |
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" height="calc(100vh - 286px)" @selection-change="selectionChangeHandler" @row-click="clickRowHandler"> |
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" height="calc(100vh - 286px)" @selection-change="selectionChangeHandler" @row-click="clickRowHandler"> |
|
@ -19,8 +26,8 @@ |
|
|
<el-table-column prop="isColumnLength" label="字段长度" /> |
|
|
<el-table-column prop="isColumnLength" label="字段长度" /> |
|
|
<el-table-column label="默认值"> |
|
|
<el-table-column label="默认值"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.isDefaultValue === ''">-</span> |
|
|
|
|
|
<span v-else>{{ scope.row.isDefaultValue }}</span> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.defaultValue === ''">-</span> |
|
|
|
|
|
<span v-else>{{ scope.row.defaultValue }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -47,25 +54,27 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { add, edit, verifyMaintenance } from '@/api/archivesConfig/field' |
|
|
|
|
|
|
|
|
import { add, edit, verifyMaintenance } from '@/api/system/field' |
|
|
import eForm from './module/form' |
|
|
import eForm from './module/form' |
|
|
import { encrypt } from '@/utils/rsaEncrypt' |
|
|
import { encrypt } from '@/utils/rsaEncrypt' |
|
|
import CRUD, { presenter } from '@crud/crud' |
|
|
import CRUD, { presenter } from '@crud/crud' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
|
|
|
|
|
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
import { exportFile } from '@/utils/index' |
|
|
|
|
|
import qs from 'qs' |
|
|
export default { |
|
|
export default { |
|
|
name: 'Field', |
|
|
name: 'Field', |
|
|
components: { eForm, crudOperation }, |
|
|
components: { eForm, crudOperation }, |
|
|
mixins: [presenter()], |
|
|
mixins: [presenter()], |
|
|
cruds() { |
|
|
cruds() { |
|
|
return CRUD({ |
|
|
return CRUD({ |
|
|
url: 'api/field/findGroupType', |
|
|
|
|
|
|
|
|
url: 'api/categoryField/findGroupType', |
|
|
crudMethod: { add, edit }, |
|
|
crudMethod: { add, edit }, |
|
|
optShow: { |
|
|
optShow: { |
|
|
add: true, |
|
|
add: true, |
|
|
edit: true, |
|
|
edit: true, |
|
|
del: false, |
|
|
del: false, |
|
|
download: true, |
|
|
|
|
|
|
|
|
download: false, |
|
|
group: false |
|
|
group: false |
|
|
}, |
|
|
}, |
|
|
queryOnPresenterCreated: false |
|
|
queryOnPresenterCreated: false |
|
@ -100,6 +109,11 @@ export default { |
|
|
showVerifyDialog: true |
|
|
showVerifyDialog: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapGetters([ |
|
|
|
|
|
'baseApi' |
|
|
|
|
|
]) |
|
|
|
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.crud.title = this.title |
|
|
this.crud.title = this.title |
|
|
this.crud.query = { |
|
|
this.crud.query = { |
|
@ -165,6 +179,22 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.crud.selectionChangeHandler(val) |
|
|
this.crud.selectionChangeHandler(val) |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
doExport(data) { |
|
|
|
|
|
this.crud.downloadLoading = true |
|
|
|
|
|
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', { |
|
|
|
|
|
confirmButtonText: '继续', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
dangerouslyUseHTMLString: true |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
const params = { |
|
|
|
|
|
'isType': this.isType |
|
|
|
|
|
} |
|
|
|
|
|
exportFile(this.baseApi + '/api/categoryField/download?' + qs.stringify(params, { indices: false })) |
|
|
|
|
|
this.crud.downloadLoading = false |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|