|
@@ -4,7 +4,7 @@
|
|
|
:append-to-body="true"
|
|
:append-to-body="true"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
custom-class="ele-dialog-form"
|
|
custom-class="ele-dialog-form"
|
|
|
- title="选择记录规则"
|
|
|
|
|
|
|
+ title="选择记录事项"
|
|
|
@update:visible="updateVisible"
|
|
@update:visible="updateVisible"
|
|
|
:maxable="true"
|
|
:maxable="true"
|
|
|
width="90%"
|
|
width="90%"
|
|
@@ -40,13 +40,13 @@
|
|
|
components: { search },
|
|
components: { search },
|
|
|
mixins: [tabMixins, dictMixins],
|
|
mixins: [tabMixins, dictMixins],
|
|
|
props: {
|
|
props: {
|
|
|
- // 是否多选
|
|
|
|
|
- multiple: {
|
|
|
|
|
|
|
+ // NotProduceTaskConfig bool 是否排除已配置的记录规则 过程监测传true
|
|
|
|
|
+ notProduceTaskConfig: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false
|
|
default: false
|
|
|
},
|
|
},
|
|
|
- // NotProduceTaskConfig bool 是否排除已配置的记录规则 过程监测传true
|
|
|
|
|
- notProduceTaskConfig: {
|
|
|
|
|
|
|
+ // 是否多选
|
|
|
|
|
+ multiple: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false
|
|
default: false
|
|
|
}
|
|
}
|
|
@@ -110,7 +110,7 @@
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
minWidth: 110,
|
|
|
formatter: (row) => {
|
|
formatter: (row) => {
|
|
|
- return row.version ? `V${row.version.toFixed(1)}` : '';
|
|
|
|
|
|
|
+ return `${row.versionSymbol}${row.bigVersion}${row.versionMark}${row.smallVersion}`;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -196,18 +196,25 @@
|
|
|
return {
|
|
return {
|
|
|
loading: false,
|
|
loading: false,
|
|
|
visible: false,
|
|
visible: false,
|
|
|
- selection: []
|
|
|
|
|
|
|
+ selection: [],
|
|
|
|
|
+ produceTaskId: '',
|
|
|
|
|
+ reportWorkType: '' // 记录规则报工类型 产前、过程、产后
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
|
|
+ created() {
|
|
|
this.requestDict('记录规则类型');
|
|
this.requestDict('记录规则类型');
|
|
|
this.requestDict('规则周期');
|
|
this.requestDict('规则周期');
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- open() {
|
|
|
|
|
|
|
+ open(reportWorkType, produceTaskId) {
|
|
|
|
|
+ console.log('reportWorkType', reportWorkType);
|
|
|
|
|
+ console.log('produceTaskId', produceTaskId);
|
|
|
|
|
+
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.selection = [];
|
|
this.selection = [];
|
|
|
- this.reload({}); // 刷新表格
|
|
|
|
|
|
|
+ this.reportWorkType = reportWorkType || '';
|
|
|
|
|
+ this.produceTaskId = produceTaskId || '';
|
|
|
|
|
+ this.reload(); // 刷新表格
|
|
|
},
|
|
},
|
|
|
updateVisible(val) {
|
|
updateVisible(val) {
|
|
|
this.visible = val;
|
|
this.visible = val;
|
|
@@ -217,7 +224,6 @@
|
|
|
const API = this.notProduceTaskConfig
|
|
const API = this.notProduceTaskConfig
|
|
|
? recordrulesNotProduceTaskConfigRecordRulesPage
|
|
? recordrulesNotProduceTaskConfigRecordRulesPage
|
|
|
: recordrulesPage;
|
|
: recordrulesPage;
|
|
|
-
|
|
|
|
|
return API({
|
|
return API({
|
|
|
pageNum: page,
|
|
pageNum: page,
|
|
|
size: limit,
|
|
size: limit,
|
|
@@ -225,33 +231,33 @@
|
|
|
publishStatus: 1,
|
|
publishStatus: 1,
|
|
|
// 启用
|
|
// 启用
|
|
|
enable: 1,
|
|
enable: 1,
|
|
|
- ...where
|
|
|
|
|
|
|
+ ...where,
|
|
|
|
|
+ reportWorkType: this.reportWorkType,
|
|
|
|
|
+ produceTaskId: this.produceTaskId
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.tableRef?.reload({
|
|
this.$refs.tableRef?.reload({
|
|
|
page: 1, // 已发布
|
|
page: 1, // 已发布
|
|
|
- publishStatus: 1,
|
|
|
|
|
- // 启用
|
|
|
|
|
- enable: 1,
|
|
|
|
|
where
|
|
where
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
confirmSelection() {
|
|
confirmSelection() {
|
|
|
- if (this.selection.length == 0) {
|
|
|
|
|
- this.$message.warning('请选择记录规则!');
|
|
|
|
|
|
|
+ if (this.selection.length === 0) {
|
|
|
|
|
+ this.$message.warning('请先选择记录规则');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (this.multiple) {
|
|
|
|
|
- this.$emit('chooseRules', this.selection);
|
|
|
|
|
- } else {
|
|
|
|
|
- if (this.selection.length > 1) {
|
|
|
|
|
- this.$message.warning('只能选择一条记录规则');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- this.$emit('chooseRules', this.selection[0]);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.multiple && this.selection.length > 1) {
|
|
|
|
|
+ this.$message.warning('只能选择一条记录规则');
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this.$emit(
|
|
|
|
|
+ 'chooseRules',
|
|
|
|
|
+ this.multiple ? this.selection : this.selection[0]
|
|
|
|
|
+ );
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|