| | |
| | | <template>
|
| | | <div>
|
| | | <el-table :data="tableData" v-loading="loading" height="250" :border="true">
|
| | | <el-table
|
| | | :data="tableData"
|
| | | v-loading="loading"
|
| | | height="250"
|
| | | :border="true"
|
| | | size="small"
|
| | | >
|
| | | <el-table-column
|
| | | v-if="column.length > 0"
|
| | | type="index"
|
| | | width="60"
|
| | | label="序号"
|
| | |
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | <FormTemplate
|
| | | ref="FormTemplate"
|
| | | <FormTemplateDialog
|
| | | ref="FormTemplateDialog"
|
| | | type="detail"
|
| | | :visible.sync="formTemplateVisible"
|
| | | :templateOid="this.resembleTemplateOid"
|
| | | :codeClassifyOid="this.resembleCodeClassifyOid"
|
| | | ></FormTemplate>
|
| | | ></FormTemplateDialog>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { findLike } from "@/api/formTemplate.js";
|
| | | import FormTemplateDialog from "./index.vue";
|
| | |
|
| | | export default {
|
| | | name: "ResembleQuery",
|
| | | components: { FormTemplateDialog },
|
| | | props: {
|
| | | column: {
|
| | | type: Array,
|
| | |
| | | type: String,
|
| | | default: "",
|
| | | },
|
| | | hasResemble: {
|
| | | type: Boolean,
|
| | | default: false,
|
| | | codeRuleOid: {
|
| | | type: String,
|
| | | default: "",
|
| | | },
|
| | | type: {
|
| | | type: String,
|
| | |
| | | type: Object,
|
| | | default: () => ({}),
|
| | | },
|
| | | codeRuleOid: {
|
| | | type: String,
|
| | | default: ''
|
| | | }
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | tableVisible: true,
|
| | | formTemplateVisible: false,
|
| | | activeName: "findlike",
|
| | | tableData: [],
|
| | |
| | | formItems: [],
|
| | | };
|
| | | },
|
| | | created() {
|
| | | this.getCodeRule();
|
| | | },
|
| | | computed: {
|
| | | showCodeOrder() {
|
| | | if (this.type === "add") {
|
| | | if (this.secVOList.length == 0 && this.hasResemble) {
|
| | | return false;
|
| | | }
|
| | | } else {
|
| | | if (this.hasResemble) {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | },
|
| | | },
|
| | | methods: {
|
| | | // 相似项查询
|
| | | resembleQuery(form) {
|
| | | this.loading = true;
|
| | | this.activeName = "findlike";
|
| | | const { defaultValue, formValue } = this.getDefaultValueAndFormValues(form);
|
| | | const { defaultValue, formValue } =
|
| | | this.getDefaultValueAndFormValues(form);
|
| | | let params = {
|
| | | codeClassifyOid: this.codeClassifyOid,
|
| | | codeRuleOid: this.codeRuleOid,
|
| | |
| | | data: formValue,
|
| | | };
|
| | | params = Object.assign(params, defaultValue);
|
| | | this.tableVisible = true;
|
| | | findLike(params).then((res) => {
|
| | | this.loading = false;
|
| | | this.tableData = res.data.data || [];
|
| | | });
|
| | | },
|
| | | |
| | |
|
| | | openFormTemlpate(row) {
|
| | | this.$nextTick(() => {
|
| | | console.log(this.$refs.FormTemplate);
|
| | | });
|
| | | this.codetemplateoid = row.codetemplateoid;
|
| | | this.formTemplateVisible = true;
|
| | | },
|
| | |
| | | };
|
| | | },
|
| | | },
|
| | | |
| | | };
|
| | | </script> |
| | | </script>
|