master
xy 3 years ago
parent 9b7d6848d2
commit 0b59110f2e

@ -1,10 +1,10 @@
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import Router from "vue-router";
Vue.use(Router) Vue.use(Router);
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from "@/layout";
/** /**
* Note: sub-menu only appear when route children.length >= 1 * Note: sub-menu only appear when route children.length >= 1
@ -30,83 +30,101 @@ import Layout from '@/layout'
* a base page that does not have permission requirements * a base page that does not have permission requirements
* all roles can be accessed * all roles can be accessed
*/ */
export const constantRoutes = [{ export const constantRoutes = [
path: '/login', {
component: () => import('@/views/login/index'), path: "/login",
hidden: true component: () => import("@/views/login/index"),
hidden: true,
}, },
{ {
path: '/404', path: "/404",
component: () => import('@/views/404'), component: () => import("@/views/404"),
hidden: true hidden: true,
}, },
{ {
path: '/test', path: "/test",
component: () => import('@/views/component/test.vue'), component: () => import("@/views/component/test.vue"),
hidden: true hidden: true,
}, },
{ {
path: '/info', path: "/info",
component: Layout, component: Layout,
children: [{ children: [
path: 'password', {
component: () => import('@/views/system/password'), path: "password",
name: '密码修改', component: () => import("@/views/system/password"),
meta: { name: "密码修改",
title: '密码修改' meta: {
} title: "密码修改",
}], },
hidden: true },
],
hidden: true,
}, },
{ {
path: '/', path: "/",
component: Layout, component: Layout,
redirect: '/dashboard', redirect: "/dashboard",
children: [{ children: [
path: 'dashboard', {
name: '系统首页', path: "dashboard",
component: () => import('@/views/dashboard/index'), name: "系统首页",
meta: { component: () => import("@/views/dashboard/index"),
title: '系统首页', meta: {
icon: 'dashboard' title: "系统首页",
} icon: "dashboard",
}, ] },
},
],
},
{
path: "/h5",
component: () => import("@/views/h5/index.vue"),
meta: {
title: "首页",
},
hidden: true
},
{
path: '/h5login',
component:() => import("@/views/h5/login.vue"),
meta: {
title: "登录",
},
hidden: true
} }
] ];
/** /**
* asyncRoutes * asyncRoutes
* the routes that need to be dynamically loaded based on user roles * the routes that need to be dynamically loaded based on user roles
*/ */
export const asyncRoutes = [ export const asyncRoutes = [
// 404 page must be placed at the end !!! // 404 page must be placed at the end !!!
{ {
path: '*', path: "*",
redirect: '/404', redirect: "/404",
hidden: true hidden: true,
} },
] ];
const createRouter = () => new Router({ const createRouter = () =>
// mode: 'history', // require service support new Router({
scrollBehavior: () => ({ // mode: 'history', // require service support
y: 0 scrollBehavior: () => ({
}), y: 0,
routes: constantRoutes }),
}) routes: constantRoutes,
});
const router = createRouter() const router = createRouter();
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() { export function resetRouter() {
const newRouter = createRouter() const newRouter = createRouter();
router.matcher = newRouter.matcher // reset router router.matcher = newRouter.matcher; // reset router
} }
export default router export default router;

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4052909 */ font-family: "iconfont"; /* Project id 4318661 */
src: url('iconfont.woff2?t=1683361610626') format('woff2'), src: url('iconfont.woff2?t=1699320146625') format('woff2'),
url('iconfont.woff?t=1683361610626') format('woff'), url('iconfont.woff?t=1699320146625') format('woff'),
url('iconfont.ttf?t=1683361610626') format('truetype'); url('iconfont.ttf?t=1699320146625') format('truetype');
} }
.iconfont { .iconfont {
@ -13,107 +13,47 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-jurassic_process-list:before { .icon-heyan:before {
content: "\e6c4"; content: "\e661";
} }
.icon-biaodan:before { .icon-qiantaifuwu-:before {
content: "\e663"; content: "\e605";
} }
.icon-biaozhunhuaguizeguanli:before { .icon-zhongduanzaixianguanli:before {
content: "\e60a"; content: "\e618";
}
.icon-a-zhidu6:before {
content: "\eb07";
}
.icon-dat:before {
content: "\e691";
}
.icon-audio:before {
content: "\e692";
}
.icon-video:before {
content: "\e693";
}
.icon-zip:before {
content: "\e694";
}
.icon-image:before {
content: "\e695";
}
.icon-pdf:before {
content: "\e696";
}
.icon-ppt:before {
content: "\e697";
}
.icon-21excel:before {
content: "\e698";
}
.icon-21word:before {
content: "\e699";
}
.icon-21move:before {
content: "\e69a";
}
.icon-21setting:before {
content: "\e69b";
}
.icon-21upload:before {
content: "\e69c";
}
.icon-21download:before {
content: "\e69d";
} }
.icon-21cancel:before { .icon-zhanghaoguanli:before {
content: "\e69e"; content: "\e690";
} }
.icon-21ok:before { .icon-rw-qt-t:before {
content: "\e69f"; content: "\e7c4";
} }
.icon-21copy:before { .icon-zaitu:before {
content: "\e6a0"; content: "\e60a";
} }
.icon-21delete:before { .icon-chaxun:before {
content: "\e6a1"; content: "\e61b";
} }
.icon-21edit:before { .icon-heyan1:before {
content: "\e6a2"; content: "\e604";
} }
.icon-21new:before { .icon-heyan2:before {
content: "\e6a3"; content: "\e6a3";
} }
.icon-21folder:before { .icon-dayin:before {
content: "\e6a4"; content: "\e65c";
}
.icon-21mutil:before {
content: "\e6a5";
} }
.icon-21file:before { .icon-lianxi2hebing_dayin:before {
content: "\e6a6"; content: "\e630";
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -148,13 +148,21 @@ export default {
Promise.all(promiseAll).then(res => { Promise.all(promiseAll).then(res => {
if (item.edit_input !== 'files') { if (item.edit_input !== 'files') {
let dataTable = this.allTables.find(t => t.table_name === res[1].relation[0].link_table_name); let dataTable = this.allTables.find(t => t.table_name === res[1].relation[0].link_table_name);
formShow({ id: dataTable.id }).then(res1 => { if (dataTable) {
formShow({ id: dataTable?.id }).then(res1 => {
this.linkTableList.push({
value: res[0].data?.map(o => o[res[1]?.relation[0]?.link_with_name]),
field: this.formatColumn(res1),
title: res[1]?.name
})
})
} else {
this.linkTableList.push({ this.linkTableList.push({
value: res[0].data?.map(o => o[res[1]?.relation[0]?.link_with_name]), value: this.detail[item?._relations?.link_with_name],
field: this.formatColumn(res1), field: this.formatColumn(res[1]),
title: res[1]?.name title: res[1]?.name
}) })
}) }
} else { } else {
this.linkTableList.push({ this.linkTableList.push({
value: res[0].data?.map(o => o[res[1]?.relation[0]?.link_with_name]), value: res[0].data?.map(o => o[res[1]?.relation[0]?.link_with_name]),

@ -69,12 +69,14 @@ export default {
}, },
this.$scopedSlots[i.field] this.$scopedSlots[i.field]
? this.$scopedSlots[i.field]({ ? this.$scopedSlots[i.field]({
fieldInfo: i, fieldInfo: i,
form: this.form, form: this.form,
file: this.file, file: this.file,
}) })
: (i._relations && i.edit_input !== 'file' && i.edit_input !== 'files') : i._relations &&
? [ i.edit_input !== "file" &&
i.edit_input !== "files"
? [
h( h(
"el-input", "el-input",
{ {
@ -82,60 +84,50 @@ export default {
readonly: true, readonly: true,
value: value:
i._relations.link_relation === i._relations.link_relation ===
"newHasOne" || "newHasOne" ||
i._relations.link_relation === "hasOne" i._relations.link_relation === "hasOne"
? this.originalForm[ ? this.originalForm[
i._relations.link_with_name i._relations.link_with_name
]?.name || ]?.name ||
this.originalForm[ this.originalForm[
i._relations.link_with_name i._relations.link_with_name
]?.mingcheng || ]?.mingcheng ||
this.originalForm[ this.originalForm[
i._relations.link_with_name i._relations.link_with_name
]?.no || ]?.no ||
this.originalForm[ this.originalForm[
i._relations.link_with_name i._relations.link_with_name
]?.id ]?.id || this.form[i.field]
: this.originalForm[ : this.originalForm[
i._relations.link_with_name i._relations.link_with_name
] ]
?.map( ?.map(
(j) => (j) =>
j[i._relations.custom_form_field] j[
) i._relations
?.toString(), .custom_form_field
]
)
?.toString(),
}, },
on: { on: {
// ['focus']:e => { ['focus']:e => {
// this.$refs['linkPickModal'].show() this.pickedLinkField.field = i.field;
// } this.pickedLinkField.linkType =
}, i._relations.link_relation;
}, this.pickedLinkField.linkTableName =
[ i._relations.link_table_name;
h("el-button", { this.pickedLinkField.originalRows =
props: { this.originalForm[
icon: "el-icon-arrow-right", i._relations.link_with_name
},
slot: "append",
on: {
click: (e) => {
this.pickedLinkField.field = i.field;
this.pickedLinkField.linkType =
i._relations.link_relation;
this.pickedLinkField.linkTableName =
i._relations.link_table_name;
this.pickedLinkField.originalRows =
this.originalForm[
i._relations.link_with_name
]; ];
this.$refs["linkPickModal"].show(); this.$refs["linkPickModal"].show();
}, }
}, },
}), }
] )
),
] ]
: [ : [
h( h(
domMap.get(i.edit_input), domMap.get(i.edit_input),
{ {
@ -164,55 +156,55 @@ export default {
i.edit_input === "file" || i.edit_input === "file" ||
i.edit_input === "files" i.edit_input === "files"
? { ? {
file: (scope) => { file: (scope) => {
let { file } = scope; let { file } = scope;
return [ return [
h("div", {}, [ h("div", {}, [
h("i", { 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: { class: {
"el-icon-circle-check": "uploaded-a":
file.status === "success", file.status === "success",
"el-icon-loading":
file.status === "uploading",
}, },
style: { style: {
color: padding: "0 4px",
file.status === "success"
? "green"
: "",
},
}),
h(
"a",
{
attrs: {
href: file.url,
download: file.name,
},
class: {
"uploaded-a":
file.status === "success",
},
style: {
padding: "0 4px",
},
}, },
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) this.optionsRender(h, i)
@ -314,16 +306,16 @@ export default {
if (info.edit_input === "checkbox" || info.edit_input === "radio") { if (info.edit_input === "checkbox" || info.edit_input === "radio") {
return info._params && info._params instanceof Array return info._params && info._params instanceof Array
? info._params.map((i) => ? info._params.map((i) =>
h("el-option", { h("el-option", {
props: { props: {
label: label:
i.key || i.value || i.name || i.no || i.mingcheng || i.id, i.key || i.value || i.name || i.no || i.mingcheng || i.id,
value: info._relations value: info._relations
? i[info._relations.foreign_key] ? i[info._relations.foreign_key]
: i.value, : i.value,
}, },
}) })
) )
: []; : [];
} }
if (info.edit_input === "file" || info.edit_input === "files") { if (info.edit_input === "file" || info.edit_input === "files") {
@ -443,21 +435,21 @@ export default {
if (i && (i.edit_input === "file" || i.edit_input === "files")) { if (i && (i.edit_input === "file" || i.edit_input === "files")) {
res[i._relations.link_with_name] res[i._relations.link_with_name]
? (this.file[i.field] = ? (this.file[i.field] =
res[i._relations.link_with_name] instanceof Array res[i._relations.link_with_name] instanceof Array
? res[i._relations.link_with_name].map((i) => { ? res[i._relations.link_with_name].map((i) => {
return { return {
name: i?.original_name, name: i?.original_name,
url: i?.url, url: i?.url,
response: i, response: i,
}; };
}) })
: [ : [
{ {
name: res[i._relations.link_with_name]?.original_name, name: res[i._relations.link_with_name]?.original_name,
url: res[i._relations.link_with_name]?.url, url: res[i._relations.link_with_name]?.url,
response: res[i._relations.link_with_name], response: res[i._relations.link_with_name],
}, },
]) ])
: (this.file[i.field] = []); : (this.file[i.field] = []);
return return
@ -515,7 +507,7 @@ export default {
if (info.edit_input === "files") { if (info.edit_input === "files") {
copyForm[info._relations.link_with_name] = this.file[ copyForm[info._relations.link_with_name] = this.file[
info.field info.field
]?.map((i) => { ]?.map((i) => {
return { return {
upload_id: i?.response?.id, upload_id: i?.response?.id,
original_name: i?.response?.original_name original_name: i?.response?.original_name
@ -526,7 +518,7 @@ export default {
info.field info.field
] instanceof Array ? copyForm[ ] instanceof Array ? copyForm[
info.field info.field
]?.map((i) => { ]?.map((i) => {
return { return {
[info._relations.custom_form_field]: i, [info._relations.custom_form_field]: i,
//...copyRelation, //...copyRelation,

@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
</style>

@ -0,0 +1,60 @@
<template>
<div>
<div class="title">
<h3>苏州市总工会</h3>
<h3>在档困难职工查询系统</h3>
<h5>请输入留档信息登录</h5>
</div>
<div class="form">
<el-form :model="form" label-position="top" size="mini">
<el-form-item v-for="(value,key) in form" :label="formLabel[key]">
<el-input v-model="form[key]" clearable :placeholder="'请输入'+formLabel[key]"/>
</el-form-item>
<el-form-item>
<Button long type="primary" size="small"> </Button>
</el-form-item>
</el-form>
</div>
<div>2023 苏州市总工会</div>
</div>
</template>
<script>
export default {
data() {
return {
form: {
name: '',
idcard: '',
mobile: '',
verify: '',
},
formLabel: {
name: '姓名',
idcard: '身份证号',
mobile: '手机号码',
verify: '验证码'
}
}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
.title {
color: rgb(86, 141, 205);
text-align: center;
& > h5 {
color: #999;
}
}
@media (max-width: 1024px) {
}
</style>
Loading…
Cancel
Save