master
xy 2 years ago
parent 6ab5d63c96
commit 329516bfd3

@ -2,5 +2,5 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = http://192.168.105.242
VUE_APP_UPLOAD_API = http://192.168.105.242/api/admin/upload-file
VUE_APP_BASE_API = http://weiyuan-ziliao-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://weiyuan-ziliao-test.ali251.langye.net/api/admin/upload-file

@ -19,7 +19,7 @@ router.beforeEach(async(to, from, next) => {
document.title = getPageTitle(to.meta.title)
if (/^\/index\/.*/.test(to.path)) {
//setToken('31|wFxoNgXTLwNke7CCjfCyFYd3x4s9WG74VKpYyi8S','ReceptionTokenKey')
setToken('31|wFxoNgXTLwNke7CCjfCyFYd3x4s9WG74VKpYyi8S','ReceptionTokenKey')
if (getToken('ReceptionTokenKey')) {
next()

@ -1,7 +1,7 @@
<template>
<div>
<Input
v-model="select.filter[0].value"
v-model="select.filter[1].value"
search
enter-button
placeholder="请输入名称搜索"

@ -16,7 +16,7 @@ export default {
return (
<el-scrollbar>
<div
style={{ "max-height": "50px" }}
style={{ "max-height": "400px","min-height": "50px" }}
domPropsInnerHTML={this.detail[field]}
></div>
</el-scrollbar>

@ -357,6 +357,7 @@ export default {
}
}
this.form["faburiqi"] = this.$moment(new Date()).format("YYYY-MM-DD");
this.form["shenhebumen"] = this.$store.state.user.department?.id;
this.$refs["elForm"].clearValidate();
},
show() {
@ -601,8 +602,8 @@ export default {
}
//
if (i.field === 'shenhebumen') {
this.form[i.field] = this.$store.state.user.department?.id
if (i.field === "shenhebumen") {
this.form[i.field] = this.$store.state.user.department?.id;
}
if (i.field === "faburiqi") {
this.form[i.field] = this.$moment(new Date()).format(
@ -614,7 +615,17 @@ export default {
/^\/manage\/form/.test(this.$route.fullPath)
) {
this.rules[i.field] = [
{ required: true, message: `请选择${i.name}` },
{
required: true,
message: `请选择${i.name}`,
validator: (rule, value, callback) => {
if (this.file[i.field] && this.file[i.field].length > 0) {
callback();
} else {
callback(new Error("请选择附件"));
}
},
},
];
}
}
@ -633,6 +644,9 @@ export default {
this.init();
this.$refs["elForm"].clearValidate();
delete this.form.id;
for (let key in this.file) {
this.file[key] = [];
}
}
},
},

@ -648,12 +648,10 @@ export default {
if (i.edit_input === "richtext") {
linkOb.customFn = (row) => {
return (
<el-scrollbar>
<div
style={{ "max-height": "50px" }}
domPropsInnerHTML={row[i.field]}
></div>
</el-scrollbar>
<div
style={{ "max-height": "55px","overflow": "scroll" }}
domPropsInnerHTML={row[i.field]}
></div>
);
};
}
@ -699,19 +697,31 @@ export default {
if (link_relation === "hasMany" || link_relation === "newHasMany") {
linkOb.customFn = (row) => {
return (
<div>
{row[link_with_name]?.map((o) => (
<p>
{o?.name ||
o?.no ||
o?.value ||
o?.biaoti ||
o?.mingcheng}
</p>
))}
</div>
);
if (i.edit_input === "files") {
return (
<div style="display: flex;flex-direction: column;">
{row[link_with_name]?.map((o) => (
<a>
{ o?.original_name || o?.name }
</a>
))}
</div>
)
} else {
return (
<div>
{row[link_with_name]?.map((o) => (
<p>
{o?.name ||
o?.no ||
o?.value ||
o?.biaoti ||
o?.mingcheng}
</p>
))}
</div>
);
}
};
}
}

@ -587,13 +587,31 @@ export default {
if (link_relation === "hasMany" || link_relation === "newHasMany") {
linkOb.customFn = (row) => {
return (
<div>
{row[link_with_name]?.map((o) => (
<p>{ o?.name || o?.no || o?.value || o?.biaoti || o?.mingcheng }</p>
))}
</div>
);
if (i.edit_input === "files") {
return (
<div style="display: flex;flex-direction: column;">
{row[link_with_name]?.map((o) => (
<a>
{ o?.original_name || o?.name }
</a>
))}
</div>
)
} else {
return (
<div>
{row[link_with_name]?.map((o) => (
<p>
{o?.name ||
o?.no ||
o?.value ||
o?.biaoti ||
o?.mingcheng}
</p>
))}
</div>
);
}
};
}
}

@ -88,7 +88,7 @@ import { index } from '@/api/system/baseForm'
<div>{
row.id_material_fujian_uploads_material_id_relation.map(i => {
return (
<a href={i.url} download={i.name} class="uploaded-a" style="padding-left: 10px;">{ i.name }</a>
<a href={i.url} download={i.original_name || i.name} class="uploaded-a" style="padding-left: 10px;">{ i.original_name || i.name }</a>
)
})
}</div>

@ -41,7 +41,7 @@
<div class="file" v-if="info.id_material_fujian_uploads_material_id_relation && info.id_material_fujian_uploads_material_id_relation.length > 0">
<p class="file__text">附件</p>
<div class="file__item" v-for="item in info.id_material_fujian_uploads_material_id_relation">
<a>{{ item.name }}</a>
<a>{{ item.original_name || item.name }}</a>
<div class="file__item--btn" @click="open(item)"></div>
<i class="el-icon-download file__item--down" @click="down(item)"></i>
</div>
@ -210,4 +210,14 @@ export default {
}
}
a {
color: red;
text-decoration: none;
transition: all 0.2s;
}
a:hover {
color: red;
text-decoration: underline;
}
</style>

@ -72,7 +72,7 @@
placement="bottom-start"
@command="down"
>
<i class="el-icon-download" @click="getDetail(i)"></i>
<i class="el-icon-download" @click="getDetail(i,false)"></i>
<template #dropdown>
<el-dropdown-menu v-if="load">
<div
@ -221,7 +221,7 @@ export default {
this.loading = false;
},
async getDetail(i) {
async getDetail(i,isOpen=true) {
this.load = true;
const res = await detail({
table_name: "materials",
@ -229,7 +229,7 @@ export default {
});
this.uploadsList =
res.detail?.id_material_fujian_uploads_material_id_relation || [];
if (this.uploadsList.length === 1) {
if (this.uploadsList.length === 1 && isOpen) {
this.open(this.uploadsList[0])
}
this.load = false;

Loading…
Cancel
Save