| | |
| | | // åå²å¯¼å
¥æ¨¡æ¿ä¸è½½
|
| | | export const downloadHistoryImportTemplate = (params) => {
|
| | | return request({
|
| | | url: '/api/ubcs-code/mdmEngineController/downloadTopImportExcel',
|
| | | url: '/api/ubcs-code/mdmEngineController/downloadImportExcelHistory',
|
| | | method: 'get',
|
| | | params
|
| | | })
|
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template>
|
| | | <el-dialog
|
| | | :title="title"
|
| | | :visible="dialogVisible"
|
| | | width="1200px"
|
| | | append-to-body
|
| | | >
|
| | | <div class="flex_box">
|
| | | <div class="left" :style="{ width: leftWidth }">
|
| | | <div class="isExpand_box">
|
| | | <el-link type="primary" @click="hideTree">
|
| | | <i
|
| | | :class="isExpand ? 'el-icon-arrow-left' : 'el-icon-arrow-right'"
|
| | | ></i>
|
| | | {{ isExpand ? "æ¶ç¼©" : "å±å¼" }}
|
| | | </el-link>
|
| | | </div>
|
| | | <el-input
|
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤"
|
| | | v-model="filterText"
|
| | | size="small"
|
| | | v-show="isExpand"
|
| | | >
|
| | | </el-input>
|
| | | <el-tree
|
| | | v-show="isExpand"
|
| | | class="filter_tree"
|
| | | :data="data"
|
| | | default-expand-all
|
| | | :filter-node-method="filterNode"
|
| | | ref="tree"
|
| | | >
|
| | | </el-tree>
|
| | | </div>
|
| | | <div class="right">
|
| | | <div class="tab_box">
|
| | | <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
| | | <el-tab-pane label="æ£ç¡®æ°æ®" name="success">
|
| | | <el-table border :data="successData"></el-table>
|
| | | </el-tab-pane>
|
| | | <el-tab-pane label="æç¸ä¼¼é¡¹æè
éè¯¯æ°æ®" name="error">
|
| | | <el-table border :data="errorData"></el-table>
|
| | | </el-tab-pane>
|
| | | </el-tabs>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <template #footer>
|
| | | <div>
|
| | | <el-button size="small" type="primary">ç¡®å®å¯¼å
¥</el-button>
|
| | | <el-button size="small">åæ¶</el-button>
|
| | | </div>
|
| | | </template>
|
| | | </el-dialog>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | export default {
|
| | | name: "ShowImportData",
|
| | | props: {
|
| | | title: {
|
| | | type: String,
|
| | | default: "å岿°æ®å¯¼å
¥",
|
| | | },
|
| | | visible: false,
|
| | | },
|
| | | computed: {
|
| | | dialogVisible: {
|
| | | get() {
|
| | | return this.visible;
|
| | | },
|
| | | set(val) {
|
| | | this.$emit("update:visible", val);
|
| | | },
|
| | | },
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | isExpand: true,
|
| | | filterText: "",
|
| | | leftWidth: "200px",
|
| | | data: [
|
| | | {
|
| | | id: 1,
|
| | | label: "ä¸çº§ 1",
|
| | | children: [
|
| | | {
|
| | | id: 4,
|
| | | label: "äºçº§ 1-1",
|
| | | children: [
|
| | | {
|
| | | id: 9,
|
| | | label: "ä¸çº§ 1-1-1",
|
| | | },
|
| | | {
|
| | | id: 10,
|
| | | label: "ä¸çº§ 1-1-2",
|
| | | },
|
| | | ],
|
| | | },
|
| | | ],
|
| | | },
|
| | | {
|
| | | id: 2,
|
| | | label: "ä¸çº§ 2",
|
| | | children: [
|
| | | {
|
| | | id: 5,
|
| | | label: "äºçº§ 2-1",
|
| | | },
|
| | | {
|
| | | id: 6,
|
| | | label: "äºçº§ 2-2",
|
| | | },
|
| | | ],
|
| | | },
|
| | | {
|
| | | id: 3,
|
| | | label: "ä¸çº§ 3",
|
| | | children: [
|
| | | {
|
| | | id: 7,
|
| | | label: "äºçº§ 3-1",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | {
|
| | | id: 8,
|
| | | label: "äºçº§ 3-2",
|
| | | },
|
| | | ],
|
| | | },
|
| | | ],
|
| | | successData: [],
|
| | | errorData: [],
|
| | | };
|
| | | },
|
| | |
|
| | | methods: {
|
| | | filterNode(value, data) {
|
| | | if (!value) return true;
|
| | | return data.label.indexOf(value) !== -1;
|
| | | },
|
| | | hideTree() {
|
| | | if (this.isExpand) {
|
| | | this.leftWidth = "50px";
|
| | | } else {
|
| | | this.leftWidth = "200px";
|
| | | }
|
| | | this.isExpand = !this.isExpand;
|
| | | },
|
| | | },
|
| | | watch: {
|
| | | filterText(val) {
|
| | | this.$refs.tree.filter(val);
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
|
| | | <style lang="scss" scoped>
|
| | | .flex_box {
|
| | | display: flex;
|
| | | .left {
|
| | | transition: all 0.3s;
|
| | | .isExpand_box {
|
| | | margin-bottom: 10px;
|
| | | text-align: right;
|
| | | }
|
| | | .filter_tree {
|
| | | max-height: 400px;
|
| | | overflow-y: scroll;
|
| | | }
|
| | | }
|
| | | }
|
| | | </style>
|
| | |
| | | <template>
|
| | | <el-dialog :title="title" :visible="visible" append-to-body>
|
| | | <Divider text="导å
¥æç¤º" left="30px"></Divider>
|
| | | <ul>
|
| | | <li v-for="(item, index) in tipList" :key="index">
|
| | | {{ item }}
|
| | | </li>
|
| | | </ul>
|
| | | <div class="radio_box">
|
| | | <span>åç±»çè·¯å¾ä½¿ç¨ç屿§:</span>
|
| | | <el-radio-group v-model="classifyAttr">
|
| | | <el-radio label="id">åç±»ç¼å·</el-radio>
|
| | | <el-radio label="name">åç±»åç§°</el-radio>
|
| | | </el-radio-group>
|
| | | </div>
|
| | | <Divider text="excelæä»¶ï¼éæ©æä»¶åä¼èªå¨ä¸ä¼ " left="30px"></Divider>
|
| | | <el-upload
|
| | | class="upload"
|
| | | :accept="accept"
|
| | | :action="action"
|
| | | :before-upload="beforeUpload"
|
| | | :on-exceed="handleExceed"
|
| | | :headers="uploadHeaders"
|
| | | :on-success="onSuccess"
|
| | | :show-file-list="false"
|
| | | :data="{
|
| | | codeClassifyOid: this.codeClassifyOid,
|
| | | classifyAttr: this.classifyAttr,
|
| | | }"
|
| | | >
|
| | | <el-button size="small" type="primary"
|
| | | ><i class="el-icon-upload"></i> ç¹å»ä¸ä¼ </el-button
|
| | | <div>
|
| | | <el-dialog :title="title" :visible="visible" append-to-body>
|
| | | <Divider text="导å
¥æç¤º" left="30px"></Divider>
|
| | | <ul>
|
| | | <li v-for="(item, index) in tipList" :key="index">
|
| | | {{ item }}
|
| | | </li>
|
| | | </ul>
|
| | | <div class="radio_box">
|
| | | <span>åç±»çè·¯å¾ä½¿ç¨ç屿§:</span>
|
| | | <el-radio-group v-model="classifyAttr">
|
| | | <el-radio label="id">åç±»ç¼å·</el-radio>
|
| | | <el-radio label="name">åç±»åç§°</el-radio>
|
| | | </el-radio-group>
|
| | | </div>
|
| | | <Divider text="excelæä»¶ï¼éæ©æä»¶åä¼èªå¨ä¸ä¼ " left="30px"></Divider>
|
| | | <el-upload
|
| | | class="upload"
|
| | | :accept="accept"
|
| | | :action="action"
|
| | | :before-upload="beforeUpload"
|
| | | :on-exceed="handleExceed"
|
| | | :headers="uploadHeaders"
|
| | | :on-success="onSuccess"
|
| | | :show-file-list="false"
|
| | | :data="{
|
| | | codeClassifyOid: this.codeClassifyOid,
|
| | | classifyAttr: this.classifyAttr,
|
| | | }"
|
| | | >
|
| | | </el-upload>
|
| | | <template #footer>
|
| | | <el-button type="primary" size="small" @click="downloadTemplateFun" :loading="downloadLoading"
|
| | | >ä¸è½½å¯¼å
¥æ¨¡æ¿</el-button
|
| | | >
|
| | | <el-button size="small">å
³é</el-button>
|
| | | </template>
|
| | | </el-dialog>
|
| | | <el-button size="small" type="primary"
|
| | | ><i class="el-icon-upload"></i> ç¹å»ä¸ä¼ </el-button
|
| | | >
|
| | | </el-upload>
|
| | | <template #footer>
|
| | | <el-button
|
| | | type="primary"
|
| | | size="small"
|
| | | @click="downloadTemplateFun"
|
| | | :loading="downloadLoading"
|
| | | >ä¸è½½å¯¼å
¥æ¨¡æ¿</el-button
|
| | | >
|
| | | <el-button size="small" @click="visible = false">å
³é</el-button>
|
| | | </template>
|
| | | </el-dialog>
|
| | | <ShowImportData :visible="showVisible" v-if="showVisible"></ShowImportData>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { downloadHistoryImportTemplate, downloadErrorFile } from "../../api/batchImport/index";
|
| | | import ShowImportData from "./ShowImportData.vue";
|
| | | import {
|
| | | downloadHistoryImportTemplate,
|
| | | downloadErrorFile,
|
| | | } from "../../api/batchImport/index";
|
| | | import { getToken } from "@/util/auth";
|
| | | export default {
|
| | | name: "",
|
| | | name: "BatchImport",
|
| | | components: { ShowImportData },
|
| | | props: {
|
| | | visible: {
|
| | | type: Boolean,
|
| | |
| | | return {
|
| | | classifyAttr: "id",
|
| | | uploadParams: {},
|
| | | downloadLoading: false
|
| | | downloadLoading: false,
|
| | | showVisible: false,
|
| | | };
|
| | | },
|
| | | computed: {
|
| | |
| | | },
|
| | | // ä¸è½½å¯¼å
¥æ¨¡æ¿
|
| | | downloadTemplateFun() {
|
| | | this.downloadLoading = true
|
| | | this.downloadLoading = true;
|
| | | downloadHistoryImportTemplate({
|
| | | codeClassifyOid: "535FC9B6-FE27-241F-5FCA-ED4DC17CF95B",
|
| | | }).then(res => {
|
| | | this.downloadLoading = false
|
| | | console.log(res);
|
| | | }).catch(() => {
|
| | | this.downloadLoading = false
|
| | | });
|
| | | })
|
| | | .then((res) => {
|
| | | this.downloadLoading = false;
|
| | | console.log(res);
|
| | | })
|
| | | .catch(() => {
|
| | | this.downloadLoading = false;
|
| | | });
|
| | | },
|
| | | onSuccess(res) {
|
| | | if (res.code === 400) {
|
| | | this.$message.error(`${res.msg}ï¼è¯·ä¸è½½é误信æ¯è¿è¡æ¥çï¼`)
|
| | | this.$message.error(`${res.msg}ï¼è¯·ä¸è½½é误信æ¯è¿è¡æ¥çï¼`);
|
| | | }
|
| | | downloadErrorFile({uuid: res.data.fileOid})
|
| | | }
|
| | | downloadErrorFile({ uuid: res.data.fileOid });
|
| | | },
|
| | | },
|
| | | watch: {
|
| | | visible: {
|
| | | immediate:true,
|
| | | immediate: true,
|
| | | handler() {
|
| | | this.getDataByType();
|
| | | }
|
| | | }
|
| | | },
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
| | | collapse: true, |
| | | column: [], |
| | | }); |
| | | return |
| | | } |
| | | if ( |
| | | formItem.type === "combox" && |
| | |
| | | this.$set(this.option, "column", column); |
| | | this.$set(this.option, "group", group); |
| | | this.formIndex++; |
| | | if (this.type === 'add') { |
| | | if (this.type === 'add' || this.type === 'preview') { |
| | | this.loading = false; |
| | | } |
| | | this.geDictData(dictKeys); |
| | |
| | | if (type === "truefalse") { |
| | | return [ |
| | | { |
| | | key: false, |
| | | key: 'false', |
| | | value: "å¦", |
| | | }, |
| | | { |
| | | key: true, |
| | | key: 'true', |
| | | value: "æ¯", |
| | | }, |
| | | ]; |
| | |
| | | }, |
| | | // è·å表å详æ
æ°æ® |
| | | getFormDetail() { |
| | | if (this.type === 'add') return |
| | | if (this.type === 'add' || this.type === 'preview') return |
| | | getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then( |
| | | (res) => { |
| | | this.form = Object.assign(this.form, res.data.data[0]) |
| | |
| | | type: {
|
| | | type: String,
|
| | | default: "add",
|
| | | },
|
| | | form: {
|
| | | type: Object,
|
| | | default: () => ({}),
|
| | | },
|
| | | }
|
| | | },
|
| | | data() {
|
| | | return {
|
| | |
| | | activeName: "findlike",
|
| | | tableData: [],
|
| | | loading: false,
|
| | | resembleTemplateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
|
| | | resembleCodeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
|
| | | resembleTemplateOid: "",
|
| | | resembleCodeClassifyOid: "",
|
| | | rowOid: '',
|
| | | defaultValue: {},
|
| | | secVOList: [],
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { getFormTemplate } from "@/api/formTemplate";
|
| | | import { getFormTemplate, getFormDetail } from "@/api/formTemplate";
|
| | | import ResembleQuery from "./ResembleQuery";
|
| | | export default {
|
| | | name: "ResembleQueryDialog",
|
| | |
| | | type: String,
|
| | | default: "",
|
| | | },
|
| | | rowOid: "",
|
| | | codeRuleOid: {
|
| | | type: String,
|
| | | default: "",
|
| | |
| | | data() {
|
| | | return {
|
| | | column: [],
|
| | | loading: false
|
| | | loading: false,
|
| | | detailData: {},
|
| | | };
|
| | | },
|
| | | computed: {
|
| | |
| | | },
|
| | | methods: {
|
| | | openDialog() {
|
| | | this.loading = true
|
| | | getFormTemplate({
|
| | | templateOid: this.templateOid,
|
| | | codeClassifyOid: this.codeClassifyOid,
|
| | | }).then((res) => {
|
| | | this.loading = false
|
| | | if (
|
| | | res.data &&
|
| | | res.data.resembleTableVO.cols &&
|
| | | res.data.resembleTableVO.cols.length > 0
|
| | | ) {
|
| | | this.column = res.data.resembleTableVO.cols;
|
| | | this.$refs.ResembleQuery.resembleQuery();
|
| | | } else {
|
| | | this.column = [];
|
| | | }
|
| | | });
|
| | | this.loading = true;
|
| | | getFormDetail({ templateOid: this.templateOid, oid: this.rowOid })
|
| | | .then((res) => {
|
| | | this.detailData = res.data.data[0] || {};
|
| | | return getFormTemplate({
|
| | | templateOid: this.templateOid,
|
| | | codeClassifyOid: this.codeClassifyOid,
|
| | | });
|
| | | })
|
| | | .then((res) => {
|
| | | this.loading = false;
|
| | | if (
|
| | | res.data &&
|
| | | res.data.resembleTableVO.cols &&
|
| | | res.data.resembleTableVO.cols.length > 0
|
| | | ) {
|
| | | this.column = res.data.resembleTableVO.cols;
|
| | | this.$refs.ResembleQuery.resembleQuery(this.detailData);
|
| | | } else {
|
| | | this.column = [];
|
| | | }
|
| | | });
|
| | | },
|
| | | },
|
| | | };
|
| | |
| | | <el-button @click="visible2 = true">é件管çdialog</el-button> |
| | | <FormTemplateDialog |
| | | :visible.sync="visible" |
| | | :type="this.type" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :type="type" |
| | | :templateOid="templateOid" |
| | | :codeClassifyOid="codeClassifyOid" |
| | | :codeRuleOid="codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | @submit="submit" |
| | | ></FormTemplateDialog> |
| | | <ResembleQueryDialog |
| | | :visible.sync="visible1" |
| | | :type="this.type" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :type="type" |
| | | :templateOid="templateOid" |
| | | :codeClassifyOid="codeClassifyOid" |
| | | :rowOid="rowOid" |
| | | :codeRuleOid="codeRuleOid" |
| | | ></ResembleQueryDialog> |
| | | <BatchImport |
| | | :visible="visible3" |
| | |
| | | // é»è®¤ç¦ç¨ç表å
ç´ |
| | | disabledProp: ["id", "lcstatus"], |
| | | // 表åç±»å |
| | | type: "add", |
| | | templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | type: "edit", |
| | | templateOid: "f441b131-5ea0-4672-ab74-735b11161928", |
| | | codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96", |
| | | rowOid: "6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9", |
| | | rowOid: "551FBA49-9A94-2F83-9126-9DD4F9BB14B5", |
| | | }; |
| | | }, |
| | | methods: { |