|
|
@@ -2,7 +2,7 @@
|
|
|
<basic-container>
|
|
|
|
|
|
<basic-card title="LOGO设置">
|
|
|
- <avue-form :option="logoOption" v-model="logoForm" style="width: 320px; margin: 0;"></avue-form>
|
|
|
+ <avue-form :option="logoOption" v-model="logoForm" style="width: 320px; margin: 0;" @submit="handleSubmitLogo"></avue-form>
|
|
|
</basic-card>
|
|
|
|
|
|
<year-month-select v-model="yearAndMonth" :showMonth="false" style="width: 120px;"></year-month-select>
|
|
|
@@ -29,6 +29,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {mapGetters} from "vuex";
|
|
|
+import { getDetail as getTenantDetail, update as updateTenant } from '@/api/system/tenant';
|
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
|
import basicCard from "@/components/basic-card";
|
|
|
import compInfoTable from "./components/comp-info-table.vue";
|
|
|
@@ -53,17 +55,22 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "企业LOGO",
|
|
|
- prop: "attachment",
|
|
|
+ prop: "logoUrl",
|
|
|
type: "upload",
|
|
|
listType: "picture-img",
|
|
|
span: 24,
|
|
|
fileType: "img", //img/video/audio
|
|
|
accept: "image/png, image/jpeg",
|
|
|
propsHttp: {
|
|
|
- res: "data",
|
|
|
+ res: 'data',
|
|
|
+ url: 'link',
|
|
|
+ },
|
|
|
+ canvasOption: {
|
|
|
+ text: ' ',
|
|
|
+ ratio: 0.1
|
|
|
},
|
|
|
+ action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
tip: "注:上传LOGO图片,尺寸推荐:20*20,显示在系统左上角。",
|
|
|
- action: "https://api.avuejs.com/imgupload",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
@@ -88,7 +95,7 @@ export default {
|
|
|
res: "data",
|
|
|
},
|
|
|
tip: "请上传当前年度的高企证书",
|
|
|
- action: "https://api.avuejs.com/imgupload",
|
|
|
+ action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
@@ -110,5 +117,31 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["userInfo"]),
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getTenantDetailFunc(this.userInfo.tenant_id);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getTenantDetailFunc(tenantId) {
|
|
|
+ getTenantDetail(tenantId).then(({ data }) => {
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.logoForm = data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleSubmitLogo(form, done) {
|
|
|
+ const params = { ...this.logoForm, tenantId: this.userInfo.tenant_id };
|
|
|
+ updateTenant(params).then(({ data }) => {
|
|
|
+ done();
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.$message.success('保存成功!');
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|