详情
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
<template>
|
||||
<section class="Add">
|
||||
<ai-detail class="add">
|
||||
<ai-detail class="add" v-if="isEdit == true || !id">
|
||||
<template #title>
|
||||
<ai-title :title="params.id ? '编辑' : '新增行政许可信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
|
||||
<ai-title :title="params.id ? '编辑行政许可信息' : '新增行政许可信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
|
||||
</template>
|
||||
<template #right>
|
||||
<!-- <span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="forms=data,isEdit=true">修改</span> -->
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="isEdit==false">取消</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="confirm(id)">保存</span>
|
||||
</template>
|
||||
<template #content>
|
||||
<div class="add-form">
|
||||
<ai-bar title="新增许可信息"></ai-bar>
|
||||
<ai-bar :title="params.id ? '编辑行政许可信息' : '新增行政许可信息'"></ai-bar>
|
||||
<el-form ref="forms" :model="forms" :rules="formRules" size="small" label-width="150px">
|
||||
<el-form-item label="许可文书名称" prop="licenseName">
|
||||
<el-input v-model="forms.licenseName" placeholder="请输入"></el-input>
|
||||
@@ -61,7 +66,35 @@
|
||||
</template>
|
||||
<template slot="footer" class="footer">
|
||||
<el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button>
|
||||
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
||||
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
<ai-detail class="add" v-if="id && !isEdit">
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #right>
|
||||
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="forms=data,isEdit=true">修改</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="isEdit==false">取消</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="confirm(id)">保存</span>
|
||||
</template>
|
||||
<template #content v-if="isEdit == false">
|
||||
<ai-wrapper>
|
||||
<!-- dict.getLabel('fpRiskType', info.riskType) -->
|
||||
<ai-info-item label="许可文书名称" :value="data.licenseName"></ai-info-item>
|
||||
<ai-info-item label="许可文书号" :value="data.licenseName"></ai-info-item>
|
||||
<ai-info-item label="许可决定日期" :value="data.decisionDate"></ai-info-item>
|
||||
<ai-info-item label="许可有效期自" :value="data.startDate"></ai-info-item>
|
||||
<ai-info-item label="许可有效期至" :value="data.endDate"></ai-info-item>
|
||||
<ai-info-item label="许可机关" isLine :value="data.licenseOrganization"></ai-info-item>
|
||||
<ai-info-item label="经营主体" isLine :value="data.enterpriseName"></ai-info-item>
|
||||
<ai-info-item label="统一信用代码" isLine :value="data.unifiedCode"></ai-info-item>
|
||||
<ai-info-item label="许可内容" isLine :value="data.licenseContent"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
@@ -103,10 +136,18 @@ export default {
|
||||
enterpriseName: '',
|
||||
unifiedCode: '',
|
||||
licenseContent: '',
|
||||
}
|
||||
},
|
||||
isEdit: false,
|
||||
data: {},
|
||||
id: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getDetail(this.params.id)
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
cancel(isRefresh) {
|
||||
this.$emit('change', {
|
||||
@@ -114,13 +155,19 @@ export default {
|
||||
isRefresh: !!isRefresh,
|
||||
})
|
||||
},
|
||||
confirm () {
|
||||
getDetail(id) {
|
||||
this.instance.post(`/appcreditadminstrativelicense/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm (id) {
|
||||
this.$refs.forms.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/appcreditadminstrativelicense/addOrUpdate`, {
|
||||
...this.forms,
|
||||
id: this.params.id || '',
|
||||
// picture: this.form.picture.length ? this.form.picture[0].url : ''
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
<template>
|
||||
<div class="Detail">
|
||||
<ai-detail class="add">
|
||||
<template #title>
|
||||
<ai-title :title="params.id ? '详情' : '新增行政许可信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
|
||||
</template>
|
||||
<template #content>
|
||||
<div class="add-form">
|
||||
<div class="info">
|
||||
<ai-bar title="基本信息"></ai-bar>
|
||||
<el-form ref="forms" :model="forms" size="small" label-width="150px">
|
||||
<el-form-item label="许可文书名称" prop="num">
|
||||
{{ forms.licenseName }}
|
||||
</el-form-item>
|
||||
<el-row type="flex">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="许可文书号" prop="num">
|
||||
{{ forms.licenseCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="许可决定日期" prop="num">
|
||||
{{ forms.decisionDate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="许可有效期自" prop="num">
|
||||
{{ forms.startDate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="许可有效期至" prop="num">
|
||||
{{ forms.endDate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="许可机关" prop="num">
|
||||
{{ forms.licenseOrganization }}
|
||||
</el-form-item>
|
||||
<el-row type="flex">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="经营主体" prop="num">
|
||||
{{ forms.enterpriseName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="统一信用代码" prop="num">
|
||||
{{ forms.unifiedCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="许可内容" prop="num">
|
||||
{{ forms.licenseContent }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Detail",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
params: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
forms: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getDetail(this.params.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail(id) {
|
||||
this.instance.post(`/appcreditadminstrativelicense/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.forms = res.data
|
||||
// this.forms.codeUrl = [{
|
||||
// url: res.data.codeUrl
|
||||
// }]
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Detail {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f2f4f6 ;
|
||||
|
||||
.add-form__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
::v-deep .ai-detail__content--active {
|
||||
padding: 0 400px;
|
||||
background: #FFF;
|
||||
|
||||
.ai-detail__content--wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aibar {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
padding: 0 96px 20px 50px;
|
||||
}
|
||||
|
||||
.add-form {
|
||||
background: #fff;
|
||||
.info {
|
||||
box-sizing: border-box;
|
||||
padding: 0 100px 0 0;
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .ai-wrapper {
|
||||
align-items: inherit !important;
|
||||
}
|
||||
|
||||
.user-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
object-fit: contain;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -8,15 +8,22 @@
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="toAdd('')">添加</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="经营主体/统一信用代码" v-model="search.name" clearable @change="search" v-throttle="() => {(page.current = 1), getTableData();}"/>
|
||||
<el-input size="small" placeholder="经营主体/统一信用代码" v-model="search.name" clearable
|
||||
@clear="page.current = 1, search.name = '', getTableData()" suffix-icon="iconfont iconSearch"
|
||||
v-throttle="() => {(page.current = 1), getTableData();}"/>
|
||||
<ai-import :instance="instance" :dict="dict" importUrl="" url="appcreditadministrativesanction/downloadTemplate" type="appjob" name="行政许可信息" @success="getTableData(), $message.success('导入成功!')">
|
||||
<el-button size="small">导入</el-button>
|
||||
</ai-import>
|
||||
<!-- <ai-download :instance="instance" url="/app/appconvenientaddressbook/export" :params="search" fileName="行政许可信息"
|
||||
:disabled="tableData.length == 0"> -->
|
||||
<el-button size="small">导出</el-button>
|
||||
<!-- </ai-download> -->
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getTableData" :col-configs="colConfigs" :dict="dict" @selection-change=" (v) => (ids = v.filter((e) => e.sysUserId).map((e) => e.sysUserId)) ">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" @click.native="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click.native="toAdd(row.id)">详情</el-button>
|
||||
<el-button type="text" @click.native="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -41,6 +48,7 @@ export default {
|
||||
page: { current: 1, size: 10, total: 0 },
|
||||
dialog: false,
|
||||
form: { name: "" },
|
||||
data: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -61,8 +69,10 @@ export default {
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
import() {},
|
||||
export() {},
|
||||
// search() {
|
||||
// this.forms.licenseCode = this.search.name
|
||||
// this.getTableData()
|
||||
// },
|
||||
getTableData() {
|
||||
this.instance.post("/appcreditadminstrativelicense/list", null, {
|
||||
params: {...this.page, ...this.search, ...this.select}
|
||||
@@ -73,11 +83,13 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
id: id || ''
|
||||
id: id || '',
|
||||
isEdit: true
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -91,14 +103,6 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
toDetail(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user