|
|
|
@ -219,9 +219,16 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template #import>
|
|
|
|
<template #import>
|
|
|
|
<Button type="primary" @click="$refs['imports'].show()"
|
|
|
|
<el-upload
|
|
|
|
>导入</Button
|
|
|
|
:headers="{
|
|
|
|
>
|
|
|
|
Authorization: `Bearer ${getToken()}`,
|
|
|
|
|
|
|
|
}"
|
|
|
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
|
|
|
:action="action"
|
|
|
|
|
|
|
|
:on-sucess="importSuccess"
|
|
|
|
|
|
|
|
:file-list="fileList">
|
|
|
|
|
|
|
|
<Button type="primary">导入</Button>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template #export>
|
|
|
|
<template #export>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
@ -276,12 +283,6 @@
|
|
|
|
:form-info="form"
|
|
|
|
:form-info="form"
|
|
|
|
ref="drawer"
|
|
|
|
ref="drawer"
|
|
|
|
></drawer>
|
|
|
|
></drawer>
|
|
|
|
<imports
|
|
|
|
|
|
|
|
:table-name="customForm.tableName"
|
|
|
|
|
|
|
|
:form-info="form"
|
|
|
|
|
|
|
|
ref="imports"
|
|
|
|
|
|
|
|
@refresh="$refs['xyTable'].getTableData()"
|
|
|
|
|
|
|
|
></imports>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -296,18 +297,17 @@ import { show } from "@/api/system/customForm";
|
|
|
|
import * as XLSX from "xlsx";
|
|
|
|
import * as XLSX from "xlsx";
|
|
|
|
import { saveAs } from "file-saver";
|
|
|
|
import { saveAs } from "file-saver";
|
|
|
|
import { listdept } from "@/api/system/department"
|
|
|
|
import { listdept } from "@/api/system/department"
|
|
|
|
|
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
|
|
import add from "./component/add.vue";
|
|
|
|
import add from "./component/add.vue";
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
import headerContent from "@/components/LxHeader/XyContent.vue";
|
|
|
|
import headerContent from "@/components/LxHeader/XyContent.vue";
|
|
|
|
import drawer from "@/views/component/drawer.vue";
|
|
|
|
import drawer from "@/views/component/drawer.vue";
|
|
|
|
import imports from "@/views/component/imports.vue";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
LxHeader,
|
|
|
|
LxHeader,
|
|
|
|
headerContent,
|
|
|
|
headerContent,
|
|
|
|
drawer,
|
|
|
|
drawer,
|
|
|
|
imports,
|
|
|
|
|
|
|
|
add
|
|
|
|
add
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mixins: [authMixin],
|
|
|
|
mixins: [authMixin],
|
|
|
|
@ -316,6 +316,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
fileList: [],
|
|
|
|
op,
|
|
|
|
op,
|
|
|
|
select: {
|
|
|
|
select: {
|
|
|
|
table_name: "",
|
|
|
|
table_name: "",
|
|
|
|
@ -336,19 +337,67 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
toPrint (row,isChild = 0) {
|
|
|
|
importSuccess (response, file, fileList) {
|
|
|
|
console.log(row);
|
|
|
|
console.log(response)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async toPrint (row,isChild = 0) {
|
|
|
|
|
|
|
|
let pickChild = 0;
|
|
|
|
|
|
|
|
if (isChild) {
|
|
|
|
|
|
|
|
const h = this.$createElement;
|
|
|
|
|
|
|
|
await this.$msgbox({
|
|
|
|
|
|
|
|
title: '打印子女选择',
|
|
|
|
|
|
|
|
message: h('Table',{
|
|
|
|
|
|
|
|
key: Math.random(),
|
|
|
|
|
|
|
|
props: {
|
|
|
|
|
|
|
|
size: 'small',
|
|
|
|
|
|
|
|
data: row.id_childrens_record_id_relation,
|
|
|
|
|
|
|
|
columns: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'index',
|
|
|
|
|
|
|
|
width: 46,
|
|
|
|
|
|
|
|
label: ' '
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
key: 'name',
|
|
|
|
|
|
|
|
title: '姓名'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
'highlight-row': true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
on: {
|
|
|
|
|
|
|
|
['on-current-change']:row => {
|
|
|
|
|
|
|
|
pickChild = row.id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
|
|
if (action === 'confirm') {
|
|
|
|
|
|
|
|
if (pickChild) {
|
|
|
|
|
|
|
|
done();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
type: 'warning',
|
|
|
|
|
|
|
|
message: '请选择要打印的子女'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
done();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
const url = this.$router.resolve({
|
|
|
|
const url = this.$router.resolve({
|
|
|
|
path: '/print',
|
|
|
|
path: '/print',
|
|
|
|
query: {
|
|
|
|
query: {
|
|
|
|
bm: window.btoa(row.bianma),
|
|
|
|
bm: window.btoa(row.bianma),
|
|
|
|
isChild: window.btoa(isChild)
|
|
|
|
isChild: window.btoa(pickChild)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
window.open(url.href)
|
|
|
|
window.open(url.href)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getToken,
|
|
|
|
index,
|
|
|
|
index,
|
|
|
|
destroy,
|
|
|
|
destroy,
|
|
|
|
download,
|
|
|
|
download,
|
|
|
|
@ -442,7 +491,9 @@ export default {
|
|
|
|
i._params = keys.map(key => {
|
|
|
|
i._params = keys.map(key => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
key,
|
|
|
|
key,
|
|
|
|
value: i.select_item[key]
|
|
|
|
value: /^\d*$/.test(i.select_item[key])
|
|
|
|
|
|
|
|
? Number(i.select_item[key])
|
|
|
|
|
|
|
|
: i.select_item[key],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -580,6 +631,10 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
action () {
|
|
|
|
|
|
|
|
return `${process.env.VUE_APP_BASE_API}/api/admin/other/record-import`
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
columnArrTest() {
|
|
|
|
columnArrTest() {
|
|
|
|
return function (field) {
|
|
|
|
return function (field) {
|
|
|
|
return this.form.find((i) => i.field === field)
|
|
|
|
return this.form.find((i) => i.field === field)
|
|
|
|
|