刘翔宇-旅管家 3 years ago
commit 02e8421eec

@ -3,4 +3,4 @@ ENV = 'production'
# base api
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
VUE_APP_UPLOAD_API = http://weiyuan-ziliao-test.ali251.langye.net/api/admin/upload-file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 KiB

@ -0,0 +1,43 @@
<template>
<section class="footer">
<div class="footer__copyright">版权所有 @ 苏州卫生职业技术学院 地址: 苏州国际教育园北区科华路28号</div>
<div class="footer__filings">苏ICP备10022524号 苏公网安备32050502000249号</div>
</section>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
.footer {
color: #fff;
text-align: center;
width: 100%;
height: 91px;
background: url("../../assets/reception/footer-bkg.png");
background-repeat: no-repeat;
background-position: center;
background-size: cover;
display: flex;
flex-direction: column;
justify-content: center;
&__copyright {
font-size: 13px;
line-height: 20px;
}
&__filings {
font-size: 13px;
line-height: 20px;
}
}
</style>

@ -0,0 +1,80 @@
<template>
<section class="container">
<el-image
class="container__logo"
:src="require('@/assets/reception/container-logo.png')"
fit="contain"></el-image>
<div class="container__title">内部质量保证体系资料汇编</div>
<div class="container__login">
<i class="el-icon-user"></i>
<span>管理端登录</span>
</div>
</section>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
.container {
height: 89px;
display: flex;
align-items: center;
background: #247EC3;
z-index: 999;
position: sticky;
top: 0;
&__logo {
flex-shrink: 0;
width: 305px;
height: 100%;
margin-left: 18.65%;
}
&__title {
width: 240px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 20px;
font-weight: 400;
color: #FFFFFF;
margin-left: 14px;
}
&__login {
display: flex;
align-items: center;
& > i {
color: #fff;
font-size: 22px;
margin-right: 11px;
}
& > span {
width: 70px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
font-weight: 500;
color: #FFFFFF;
line-height: 33px;
}
margin-left: auto;
margin-right: 18.75%;
}
}
</style>

@ -0,0 +1,133 @@
<template>
<div class="search">
<div class="search-bar">
<el-input placeholder="请输入内容" v-model="inputValue">
<template #prepend>
<el-dropdown trigger="click" placement="bottom" @command="e => selectValue = e">
<el-button type="primary" class="dropdown-button">
<div style="display: flex;align-items: center;">
<i class="el-icon-search el-icon--left"></i><p class="dropdown-button__text">{{selectValue}}</p><i class="el-icon-arrow-down el-icon--right"></i>
</div>
</el-button>
<template #dropdown>
<el-dropdown-menu style="width: 235px;">
<el-dropdown-item command="部门工作职责">
<div style="text-align: center">部门工作职责</div>
</el-dropdown-item>
<el-dropdown-item command="制度文件">
<div style="text-align: center">制度文件</div>
</el-dropdown-item>
<el-dropdown-item command="工作流程">
<div style="text-align: center">工作流程</div>
</el-dropdown-item>
<el-dropdown-item command="岗位工作及标准">
<div style="text-align: center">岗位工作及标准</div>
</el-dropdown-item>
<el-dropdown-item command="表单中心">
<div style="text-align: center">表单中心</div>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-input>
</div>
<div class="search__bottom">
</div>
</div>
</template>
<script>
export default {
data() {
return {
selectValue: '搜索内部资料',
inputValue: ''
}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
.search {
width: 100%;
height: 295px;
padding: 33px 18.75% 38px 18.75%;
overflow: hidden;
position: relative;
&::before {
content: '';
background: #1e9fff;
filter: blur(8px);
z-index: 0;
position: absolute;
top: -10px;
right: -10px;
bottom: -10px;
left: -10px;
}
&__bottom {
width: 100%;
height: 179px;
background: url("../../assets/reception/search-bottom-bkg.png");
background-repeat: no-repeat;
background-size: cover;
background-position: center;
position: relative;
}
}
.dropdown-button {
width: 235px;
background: #376BA3!important;
color: #fff!important;
border: none!important;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-left: -22px !important;
padding-left: 29px !important;
padding-right: 18px !important;
&__text {
flex: 1;
font-size: 16px;
}
}
::v-deep div[x-arrow] {
display: none;
}
::v-deep .el-input__inner {
border: none;
}
</style>
<style>
.el-dropdown-menu[x-placement^=bottom] {
padding: 0!important;
border: none;
transform: translateX(-1px);
}
.el-dropdown-menu__item:not(.is-disabled):hover, .el-dropdown-menu__item:focus {
background: #247EC3!important;
color: #fff!important;
}
.el-dropdown-menu > li:nth-child(1):hover {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.el-dropdown-menu > li:nth-child(5):hover {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
</style>

@ -30,7 +30,8 @@ import Layout from '@/layout'
* a base page that does not have permission requirements
* all roles can be accessed
*/
export const constantRoutes = [{
export const constantRoutes = [
{
path: '/login',
component: () => import('@/views/login/index'),
hidden: true
@ -54,6 +55,18 @@ export const constantRoutes = [{
}],
hidden: true
},
{
path: '/index',
redirect: '/index/home',
component: () => import('@/views/reception'),
children: [
{
path: 'home',
component: () => import('@/views/reception/home')
}
],
hidden: true
},
{
path: '/',

@ -41,26 +41,27 @@ export default {
},
(() => {
let dom = [];
this.formInfo.forEach((i, index) => {
if (i.list_show) {
dom.push(
h(
"el-form-item",
{
ref: `elFormItem${i.field}`,
style: {
width: "100%",
},
props: {
label: i.name,
prop: i.field,
required:
i.validation instanceof Array
? !!i.validation.find((i) => i === "required")
: false,
},
this.formInfo.filter(i => i.form_show).forEach((i, index) => {
dom.push(
h(
"el-form-item",
{
ref: `elFormItem${i.field}`,
style: {
width: "100%",
},
[
props: {
label: i.name,
prop: i.field,
required:
i.validation instanceof Array
? !!i.validation.find((i) => i === "required")
: false,
},
},
this.$scopedSlots[i.field]
? this.$scopedSlots[i.field]({ fieldInfo: i, form: this.form })
: [
h(
domMap.get(i.edit_input),
{
@ -79,7 +80,6 @@ export default {
},
on: {
[this.getEventType(i.edit_input)]: (e) => {
console.log(1111, e);
if (i.field) {
this.form[i.field] = e;
this.form = Object.assign({}, this.form);
@ -87,61 +87,62 @@ export default {
},
},
scopedSlots:
i.edit_input === "file" || i.edit_input === "files"
i.edit_input === "file" ||
i.edit_input === "files"
? {
file: (scope) => {
let { file } = scope;
console.log(111, file);
return [
h("div", {}, [
h("i", {
file: (scope) => {
let { file } = scope;
return [
h("div", {}, [
h("i", {
class: {
"el-icon-circle-check":
file.status === "success",
"el-icon-loading":
file.status === "uploading",
},
style: {
color:
file.status === "success"
? "green"
: "",
},
}),
h(
"a",
{
attrs: {
href: file.url,
download: file.name,
},
class: {
"el-icon-circle-check":
"uploaded-a":
file.status === "success",
"el-icon-loading":
file.status === "uploading",
},
style: {
"color": file.status === "success" ? "green" : ""
}
}),
h(
"a",
{
attrs: {
href: file.url,
download: file.name,
},
class: {
"uploaded-a":
file.status === "success",
}
},
file.name
)
]),
h("i", {
class: "el-icon-close",
on: {
["click"]: () =>
this.fileRemoveHandler(
file,
i.field
),
},
}),
];
},
}
file.name
),
]),
h("i", {
class: "el-icon-close",
on: {
["click"]: () =>
this.fileRemoveHandler(
file,
i.field
),
},
}),
];
},
}
: "",
},
this.optionsRender(h, i)
),
]
)
);
}
)
);
});
return dom;
})()
@ -202,7 +203,7 @@ export default {
},
//on
getEventType(info) {
if (info.type === "checkbox") {
if (info === "checkbox") {
return "change";
}
return "input";
@ -211,12 +212,12 @@ export default {
//
optionsRender(h, info) {
if (info.edit_input === "checkbox" || info.edit_input === "radio") {
return info._paramters && info._paramters instanceof Array
? info._paramters.map((i) =>
return info._params && info._params instanceof Array
? info._params.map((i) =>
h("el-option", {
props: {
label: i.name || i.no || i.value || i.id,
value: i.id,
label: i.key || i.name || i.no || i.value || i.id,
value: info._relations ? i[info._relations.foreign_key] : i.value,
},
})
)
@ -287,13 +288,13 @@ export default {
this.file[info.field] = fileList;
};
props.onError = (err,file,fileList) => {
props.onError = (err, file, fileList) => {
this.file[info.field] = fileList;
this.$message({
type: "warning",
message: err
})
}
message: err,
});
};
}
return props;
},

@ -63,9 +63,9 @@
<Option
v-for="item in getColumnParams(select.filter[0].key)"
:key="item.id"
:value="item.id"
:value="getColumnField(select.filter[0].key)._relations ? item[getColumnField(select.filter[0].key)._relations.foreign_key] : item.value"
>{{
item.value || item.name || item.no || item.id
item.key || item.value || item.name || item.no || item.id
}}</Option
>
</Select>
@ -160,9 +160,9 @@
<Option
v-for="item in getColumnParams(item.key)"
:key="item.id"
:value="item.id"
:value="getColumnField(item.key)._relations ? item[getColumnField(item.key)._relations.foreign_key] : item.value"
>{{
item.value || item.name || item.no || item.id
item.key || item.value || item.name || item.no || item.id
}}</Option
>
</Select>
@ -414,26 +414,28 @@ export default {
}
fields.forEach((i, index) => {
i._relations = relation.find((j) => j.local_key === i.field);
i._params = {
value: [],
load: false,
get: () => i._params.value,
set: () => {
if(i._params.load) return
i._relations.parameter_id
? getparameter({ id: i._relations.parameter_id },false).then((res) => {
i._params.value = res.detail;
})
: this.index({
table_name: i._relations.link_table_name,
page: 1,
page_size: 9999,
}).then((res) => {
i._params.value = res.data;
});
i._params.load = true
},
};
if (i.select_item && typeof i.select_item === 'object') {
let keys = Object.keys(i.select_item)
i._params = keys.map(key => {
return {
key,
value: i.select_item[key]
}
})
}
if (i._relations) {
i._params = i._relations.parameter_id
? getparameter({ id: i._relations.parameter_id },false).then((res) => {
i._params = res.detail;
})
: this.index({
table_name: i._relations.link_table_name,
page: 1,
page_size: 9999,
}).then((res) => {
i._params = res.data;
});
}
});
this.form = fields;
console.log(111, this.form);
@ -464,44 +466,56 @@ export default {
// })
// }
// this.form = res.fields
this.table = res.fields
this.table = this.form
?.filter((i) => i.list_show)
.map((i) => {
let linkOb = {};
if (i.parameter_id) {
linkOb.customFn = (row) => {
return <span>{row[i.link_with_name]?.value}</span>;
};
if (i.select_item && typeof i.select_item === 'object') {
let keys = Object.keys(i.select_item)
linkOb.customFn = row => {
let paramMap = new Map()
keys.forEach(key => {
paramMap.set(i.select_item[key],key)
})
return (
<span>
{ paramMap.get(row[i.field].toString()) }
</span>
)
}
}
if (i.link_table_name) {
if (i.link_relation === "hasOne") {
linkOb.customFn = (row) => {
if (i._relations) {
let { link_relation, foreign_key, link_with_name } = i._relations
if (link_relation === 'newHasOne' || link_relation === 'hasOne') {
linkOb.customFn = row => {
if (i.edit_input === "file") {
return (
<a
download={row[i.link_with_name]?.original_name}
href={row[i.link_with_name]?.url}
download={row[link_with_name]?.original_name}
href={row[link_with_name]?.url}
>
{row[i.link_with_name]?.original_name}
{row[link_with_name]?.original_name}
</a>
);
} else {
return (
<span>
{row[i.link_with_name]?.name ||
row[i.link_with_name]?.no ||
row[i.link_with_name]?.value}
{ row[link_with_name]?.name ||
row[link_with_name]?.no ||
row[link_with_name]?.value }
</span>
);
}
};
}
}
if (i.link_relation === "hasMany") {
if (link_relation === "hasMany" || link_relation === 'newHasMany') {
linkOb.customFn = (row) => {
return (
<div>
{row[i.link_with_name]?.map((o) => (
{row[link_with_name]?.map((o) => (
<span>{o?.name || o?.no || o?.value}</span>
))}
</div>
@ -531,17 +545,24 @@ export default {
columnArrTest() {
return function (field) {
return this.form.find((i) => i.field === field)
? this.form.find((i) => i.field === field).search_input === "checkbox"
? this.form.find((i) => i.field === field).search_input === "checkbox" || this.form.find((i) => i.field === field).search_input === "radio"
: false;
};
},
getColumnField() {
return function (field) {
return this.form.find((i) => i.field === field)
? this.form.find((i) => i.field === field)
: {};
};
},
getColumnParams() {
return function (field) {
return this.form.find((i) => i.field === field)
? this.form.find((i) => i.field === field)._paramters
? this.form.find((i) => i.field === field)._params
: [];
};
},
}
},
created() {
this.getFormDetail();

@ -0,0 +1,99 @@
<template>
<div>
<div class="news">
<el-row :gutter="38">
<el-col :span="12">
<div class="news__header">
<div class="news__header--diamond">热点资料</div>
<div class="news__header--line"></div>
</div>
<ul class="news__list">
<li class="news__list--item">教育部关于公布高等学校信息公开事项清单的通知</li>
<li class="news__list--item">高等学校信息公开办法教育部令第29号</li>
<li class="news__list--item">苏州卫生职业技术学院信息公开实施办法试行</li>
<li class="news__list--item">苏州卫生职业技术学院信息公开实施办法试行</li>
<li class="news__list--item"> 苏州卫生职业技术学院信息公开实施办法试行</li>
</ul>
</el-col>
<el-col :span="12">
<div class="news__header">
<div class="news__header--diamond">最新资料</div>
<div class="news__header--line"></div>
</div>
<ul class="news__list">
</ul>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
.news {
padding: 33px 18.75% 38px 18.75%;
&__header {
display: flex;
align-items: flex-end;
&--diamond {
width: 108px;
height: 28px;
line-height: 28px;
font-size: 16px;
color: #fff;
font-weight: 500;
text-align: center;
z-index: 1;
position: relative;
&::before {
content: "";
width: 100%;
height: 100%;
background: #cad8e4;
transform: skewX(20deg);
z-index: -1;
position: absolute;
left: 0;
top: 0;
}
&::after {
content: "";
width: 100%;
height: 100%;
background: #3c7ac0;
transform: skewX(-20deg);
z-index: -1;
position: absolute;
left: 0;
top: 0;
}
}
&--line {
flex: 1;
height: 1px;
background: #C7D9E5;
margin-left: 10px;
}
}
}
</style>

@ -0,0 +1,66 @@
<template>
<div>
<navbar></navbar>
<search></search>
<router-view v-slot="{ Component }">
<transition
name="component-animation"
enter-active-class="fade-in"
leave-to-class="fade-out"
>
<keep-alive include="home">
<component :is="Component" :key="$route.name"></component>
</keep-alive>
</transition>
</router-view>
<foot></foot>
</div>
</template>
<script>
import navbar from "@/components/Reception/Navbar.vue";
import search from "@/components/Reception/Search.vue";
import foot from "@/components/Reception/Footer.vue";
export default {
components: {
navbar,
search,
foot
},
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
.fade-in {
animation: fade-in 0.6s cubic-bezier(0.39, 0.575, 0.565, 1) both;
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.fade-out {
animation: fade-out 0.4s ease-out both;
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>

@ -23,6 +23,36 @@
placeholder="请输入帮助文字"
></el-input>
</el-form-item>
<el-form-item prop="select_item" label="下拉框选项">
<div class="select-item">
<div class="select-item__header">
<span></span>
<span></span>
</div>
<div class="select-item__body" v-for="(i, index) in selectItem">
<div><el-input v-model="i.key" size="mini"></el-input></div>
<div><el-input v-model="i.value" size="mini"></el-input></div>
<div>
<el-button
type="danger"
size="mini"
circle
icon="el-icon-delete"
@click="selectItem.splice(index, 1)"
></el-button>
</div>
</div>
<el-button
type="primary"
size="mini"
circle
icon="el-icon-plus"
@click="selectItem.push({ key: '', value: '' })"
></el-button>
</div>
</el-form-item>
<el-form-item prop="validation" label="校验规则">
<el-select
v-model="selectedForm.validation"
@ -64,7 +94,10 @@
style="width: 100%"
>
<el-option
v-for="item in [{ value: 'left',label: '左' }, { value: 'right',label: '右' }]"
v-for="item in [
{ value: 'left', label: '左' },
{ value: 'right', label: '右' },
]"
:label="item.label"
:value="item.value"
></el-option>
@ -140,7 +173,6 @@
<script>
import { index as formIndex, realTableIndex } from "@/api/system/customForm";
import { listparameter } from "@/api/system/dictionary";
import { translate } from "@/api/system/customFormField";
import { debounce } from "@/utils";
@ -157,13 +189,11 @@ export default {
debouncedInputHandler: null,
formRule: {
name: [
{ required: true, message: "请输入字段名称" },
{
validator: this.checkChinese,
},
{ required: true, message: "请输入字段名称" }
],
},
selectItem: [], //
parameters: [], //
forms: [], //
};
@ -184,11 +214,20 @@ export default {
async getForms() {
const resReal = await realTableIndex();
const res = await formIndex({ page: 1, page_size: 999 });
this.forms = [...res.data,...resReal.map(i => { return { name: i,table_name: i } })];
this.forms = [
...res.data,
...resReal.map((i) => {
return { name: i, table_name: i };
}),
];
},
saveField() {
this.selectedForm.select_item = {}
this.selectItem.forEach(i => {
this.selectedForm.select_item[i.key] = i.value;
})
this.$store.commit("form/SPLICE_FORM_LIST", {
index: this.selectedIndex,
length: 1,
@ -201,6 +240,21 @@ export default {
computed: {
...mapState("form", ["selectedForm", "formList", "selectedIndex"]),
},
watch: {
selectedForm(newVal) {
if(newVal) {
this.selectItem = [];
if(newVal.select_item && typeof newVal.select_item === "object") {
for(let key in newVal.select_item) {
this.selectItem.push({
key,
value: newVal.select_item[key]
})
}
}
}
}
},
created() {
this.getForms();
@ -225,4 +279,32 @@ export default {
::v-deep .el-input-number.is-without-controls .el-input__inner {
text-align: left;
}
.select-item {
text-align: center;
&__header {
font-weight: 600;
display: flex;
& > span {
flex-basis: 30%;
& + span {
margin-left: 10px;
}
}
}
&__body {
display: flex;
& > div {
flex-basis: 30%;
& + div {
margin-left: 10px;
}
}
}
}
</style>

@ -201,7 +201,7 @@ export default {
sort: newIndex,
help: "",
validation: "",
select_item: "",
select_item: {},
list_show: 1,
form_show: 1,
is_fix: "",

@ -78,13 +78,6 @@ export default {
value={row.link_table_name}
on={{
['change']:async e => {
if(row.parameter_id) {
this.$message({
type: 'warning',
message: `${row.local_key || ''}已选择关联数据字典`
})
return
}
row.link_table_name = e
if (e) {
this.foreignFields = await this.getFields(e)
@ -112,13 +105,6 @@ export default {
value={row.parameter_id}
on={{
['change']:async e => {
if(row.link_table_name) {
this.$message({
type: 'warning',
message: `${row.local_key || ''}已选择关联表`
})
return
}
row.parameter_id = e
if (e) {
this.foreignFields = await this.getFields('parameters')
@ -165,7 +151,6 @@ export default {
customFn: (row) => {
return (
<el-select size="mini"
disabled={!!row.parameter_id}
value={row.link_relation}
on={{
['change']:e => {

@ -13,7 +13,7 @@ const name = defaultSettings.title // page title
// For example, Mac: sudo npm run
// You can change the port by the following methods:
// port = 9528 npm run dev OR npm run dev --port = 9528
const port = process.env.port || process.env.npm_config_port || 8000 // dev port
const port = process.env.port || process.env.npm_config_port || 8049 // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
@ -26,7 +26,7 @@ module.exports = {
*/
publicPath: '/admin/',
outputDir: '/Users/liuxiangyu/Work/w-weishengxueyuan/app/weiyuan-document-service/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项
less: {

Loading…
Cancel
Save