|
|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
- <tr v-if="showTabGridTitleFields" class="sticky-row" height="40px" :style="{ 'background-color': warningColor }" :class="{ 'warning': isSelected }">
|
|
|
+ <tr
|
|
|
+ v-if="showTabGridTitleFields" class="sticky-row" height="40px" :style="{ 'background-color': warningColor }"
|
|
|
+ :class="{ 'warning': isSelected }"
|
|
|
+ >
|
|
|
<td rowspan="2" class="text-center sticky-col">{{ serialNumber }}</td>
|
|
|
<td rowspan="2" class="text-center sticky-col" style="left:50px">
|
|
|
<input v-model="isSelected" autocomplete="off" type="checkbox" @click="clickModelData(modelData)" />
|
|
|
@@ -69,26 +72,23 @@
|
|
|
<td v-if="!modelData.editMode" v-show="gridFieldItem.visible" @click="clickRecord">
|
|
|
<div>
|
|
|
<CellTextItem
|
|
|
- ref="cellTextItem" :window="window"
|
|
|
- :grid-field-item="gridFieldItem" :model-data="modelData" :class-name="className"
|
|
|
- :simple-filter-params="simpleFilterParams" :complex-filter-params="complexFilterParams"
|
|
|
- :model-datas="modelDatas" :js-url="jsUrl"
|
|
|
- :index="index" @execute-callout="executeCallout(gridFieldItem)" @delete-record="deleteRecord"
|
|
|
- @refresh-datas="refreshDatas"
|
|
|
- @edit-record="editRecord"
|
|
|
- @read-record="readRecord"
|
|
|
+ ref="cellTextItem" :window="window" :grid-field-item="gridFieldItem" :model-data="modelData"
|
|
|
+ :class-name="className" :simple-filter-params="simpleFilterParams"
|
|
|
+ :complex-filter-params="complexFilterParams" :model-datas="modelDatas" :js-url="jsUrl" :index="index"
|
|
|
+ @execute-callout="executeCallout(gridFieldItem)" @delete-record="deleteRecord"
|
|
|
+ @refresh-datas="refreshDatas" @edit-record="editRecord" @read-record="readRecord"
|
|
|
/>
|
|
|
</div>
|
|
|
</td>
|
|
|
<td
|
|
|
v-else v-show="gridFieldItem.visible"
|
|
|
:class="{ 'table-cell-searchwidget': fieldUtil.isSearchType(gridFieldItem) }" @click="clickRecord"
|
|
|
- >
|
|
|
+ >
|
|
|
<CellItem
|
|
|
:ref="'cellItem' + index" :scroll-object="scrollObject" :field-item="gridFieldItem"
|
|
|
:model-data="modelData" :parent-model-data="parentModelData" :class-name="className" :window-no="windowNo"
|
|
|
:tab-index="tabIndex" @value-changed="valueChanged($event, gridFieldItem)"
|
|
|
- @execute-callout="executeCallout(gridFieldItem)"
|
|
|
+ @execute-callout="executeCallout(gridFieldItem)"
|
|
|
/>
|
|
|
</td>
|
|
|
</template>
|
|
|
@@ -100,25 +100,18 @@
|
|
|
processReportResult != null &&
|
|
|
(processReportResult.reportResults != null ||
|
|
|
processReportResult.processResult != null)
|
|
|
- "
|
|
|
- :process-report-result="processReportResult"
|
|
|
- :pdf-only="false"
|
|
|
- :excel-only="false"
|
|
|
+ " :process-report-result="processReportResult" :pdf-only="false" :excel-only="false"
|
|
|
/>
|
|
|
<template #header>
|
|
|
{{ $t("lang.tabButton.executeResult") }}
|
|
|
</template>
|
|
|
</Modal>
|
|
|
- <Modal
|
|
|
- v-model:show="titleModal"
|
|
|
- :show-canel-button="false"
|
|
|
- :show-ok-button="false"
|
|
|
- >
|
|
|
+ <Modal v-model:show="titleModal" :show-canel-button="false" :show-ok-button="false">
|
|
|
<template #header>
|
|
|
{{ tabButtonModel.tipsTitle }}
|
|
|
</template>
|
|
|
{{ tabButtonModel.tipsContent }}
|
|
|
- <template #footer>
|
|
|
+ <template #footer>
|
|
|
<button type="button" class="btn btn-default" @click="titleModalClose">
|
|
|
{{ $t("lang.tabButton.cancel") }}
|
|
|
</button>
|
|
|
@@ -139,7 +132,7 @@ import Common from '../../common/Common.js';
|
|
|
import Context from '../common/Context.js';
|
|
|
import JsUtil from '../../common/JsUtil.js';
|
|
|
import Language from '../../common/Language.js';
|
|
|
-import { Notify} from 'pc-component-v3';
|
|
|
+import { Notify } from 'pc-component-v3';
|
|
|
|
|
|
export default {
|
|
|
|
|
|
@@ -209,7 +202,7 @@ export default {
|
|
|
jsUrl: {
|
|
|
type: String,
|
|
|
default: null,
|
|
|
- },
|
|
|
+ },
|
|
|
simpleFilterParams: {
|
|
|
type: String,
|
|
|
default: null,
|
|
|
@@ -244,7 +237,7 @@ export default {
|
|
|
processReportResult: {},
|
|
|
modal: false,
|
|
|
titleModal: false,
|
|
|
- tabButtonModel:{},
|
|
|
+ tabButtonModel: {},
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -377,11 +370,11 @@ export default {
|
|
|
deleteRecord: function () {
|
|
|
this.$emit('deleteRecord');
|
|
|
},
|
|
|
- refreshDatas: function(){
|
|
|
+ refreshDatas: function () {
|
|
|
this.$emit('refreshDatas');
|
|
|
},
|
|
|
|
|
|
- buttonClick: function(){
|
|
|
+ buttonClick: function () {
|
|
|
Notify.error('提示', '暂不支持该组件', false);
|
|
|
},
|
|
|
|
|
|
@@ -389,7 +382,7 @@ export default {
|
|
|
editRecord: function (modelData, index) {
|
|
|
const validateResults = this.performValidate();
|
|
|
const allTrue = validateResults.every(item => item === true);
|
|
|
- if(allTrue) this.$emit('editRecord', modelData, index);
|
|
|
+ if (allTrue) this.$emit('editRecord', modelData, index);
|
|
|
},
|
|
|
|
|
|
readRecord: function (isRead, modelData, index) {
|
|
|
@@ -468,7 +461,7 @@ export default {
|
|
|
return validateResults;
|
|
|
},
|
|
|
clickRecord: function () {
|
|
|
- // 暂时取消双击打开
|
|
|
+ // 暂时取消双击打开
|
|
|
var now = new Date().getTime();
|
|
|
// if (now - this.lastClickTime < 500) {
|
|
|
// this.readRecord();
|
|
|
@@ -478,10 +471,10 @@ export default {
|
|
|
/**
|
|
|
* 执行Callout
|
|
|
*/
|
|
|
- executeCallout: function (gridFieldItem) {
|
|
|
- this.$emit('executeCallout', gridFieldItem);
|
|
|
+ executeCallout: function (gridFieldItem, isBtn) {
|
|
|
+ this.$emit('executeCallout', gridFieldItem, isBtn);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 获取字符串的哈希值
|
|
|
* @param input
|
|
|
@@ -497,8 +490,8 @@ export default {
|
|
|
hash = hash & hash; // 确保返回值是一个32位有符号整数
|
|
|
}
|
|
|
return Math.abs(hash).toString();
|
|
|
- },
|
|
|
-
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -533,14 +526,15 @@ export default {
|
|
|
table {
|
|
|
border-collapse: collapse;
|
|
|
background: white;
|
|
|
-
|
|
|
- th, td {
|
|
|
- border: 1px solid #e8e8e8;
|
|
|
- padding: 8px;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
-table > tbody > tr:nth-of-type(odd) {
|
|
|
+table>th,
|
|
|
+td {
|
|
|
+ border: 1px solid #e8e8e8;
|
|
|
+ padding: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+table>tbody>tr:nth-of-type(odd) {
|
|
|
background-color: #f9f9f9;
|
|
|
}
|
|
|
|