|
@@ -9,9 +9,7 @@
|
|
|
" :tab-props="tab.tabDataSource.tabDataSourceGroupDtos" @get-now-tab="getNowTab"
|
|
" :tab-props="tab.tabDataSource.tabDataSourceGroupDtos" @get-now-tab="getNowTab"
|
|
|
>
|
|
>
|
|
|
<GridColumnDef
|
|
<GridColumnDef
|
|
|
- :window-no="windowNo"
|
|
|
|
|
- :tab-index="tabIndex"
|
|
|
|
|
- :tab-grid-fields="tabGridFields"
|
|
|
|
|
|
|
+ :window-no="windowNo" :tab-index="tabIndex" :tab-grid-fields="tabGridFields"
|
|
|
@property-changed="propertyChanged($event)"
|
|
@property-changed="propertyChanged($event)"
|
|
|
/>
|
|
/>
|
|
|
</WindowTab>
|
|
</WindowTab>
|
|
@@ -43,9 +41,9 @@
|
|
|
:window="window" :now-tab="nowTab" :simple-filter-params="searchText"
|
|
:window="window" :now-tab="nowTab" :simple-filter-params="searchText"
|
|
|
:complex-filter-params="complexFilterParams" :uuid="uuid" :show-tab-dto="tab" :model-datas="modelDatas"
|
|
:complex-filter-params="complexFilterParams" :uuid="uuid" :show-tab-dto="tab" :model-datas="modelDatas"
|
|
|
:view-type="'Grid'" :curd-window-function-access="curdWindowFunctionAccess"
|
|
:view-type="'Grid'" :curd-window-function-access="curdWindowFunctionAccess"
|
|
|
- :select-model-datas="selectModelDatas"
|
|
|
|
|
- @create-record-in-window-edit="createRecordInWindowEdit" @delete-records="deleteRecords"
|
|
|
|
|
- @refresh-datas="refreshDatas" @judge-is-have-buttons="judgeIsHaveButtons"
|
|
|
|
|
|
|
+ :select-model-datas="selectModelDatas" @create-record-in-window-edit="createRecordInWindowEdit"
|
|
|
|
|
+ @delete-records="deleteRecords" @refresh-datas="refreshDatas" @judge-is-have-buttons="judgeIsHaveButtons"
|
|
|
|
|
+ @read-record="readRecord($event)"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -59,9 +57,9 @@
|
|
|
<table class="curd-table table-striped table-bordered" :width="tableWidth">
|
|
<table class="curd-table table-striped table-bordered" :width="tableWidth">
|
|
|
<thead>
|
|
<thead>
|
|
|
<GridHeader
|
|
<GridHeader
|
|
|
- :is-show-edit="false" :tab-grid-fields="tabGridFields"
|
|
|
|
|
- :window-no="windowNo" :tab-index="tabIndex" :is-chinese-english="window.isChineseEnglish"
|
|
|
|
|
- height="40px" @on-sort="onSort($event)" @property-changed="propertyChanged($event)"
|
|
|
|
|
|
|
+ :is-show-edit="false" :tab-grid-fields="tabGridFields" :window-no="windowNo"
|
|
|
|
|
+ :tab-index="tabIndex" :is-chinese-english="window.isChineseEnglish" height="40px"
|
|
|
|
|
+ @on-sort="onSort($event)" @property-changed="propertyChanged($event)"
|
|
|
@select-all="selectAll($event)" @multiple-select="changeSelectMode($event)"
|
|
@select-all="selectAll($event)" @multiple-select="changeSelectMode($event)"
|
|
|
/>
|
|
/>
|
|
|
</thead>
|
|
</thead>
|
|
@@ -72,16 +70,13 @@
|
|
|
1 +
|
|
1 +
|
|
|
(pagination.current_page - 1) * pagination.per_page
|
|
(pagination.current_page - 1) * pagination.per_page
|
|
|
" :is-show-edit="false" :tab-grid-fields="tabGridFields"
|
|
" :is-show-edit="false" :tab-grid-fields="tabGridFields"
|
|
|
- :tab-grid-title-fields="tabGridTitleFields"
|
|
|
|
|
- :model-data="modelData"
|
|
|
|
|
- :simple-filter-params="searchText"
|
|
|
|
|
- :complex-filter-params="complexFilterParams"
|
|
|
|
|
- :class-name="tab.tabDataSource.className"
|
|
|
|
|
- :scroll-object="scrollObject" :js-url="jsUrl" :model-datas="modelDatas"
|
|
|
|
|
- @delete-record="deleteRecord(modelData, true)" @edit-record="editRecord(modelData, index)"
|
|
|
|
|
- @click-model-data="clickModelData(modelData)" @read-record="readRecord(modelData, index)"
|
|
|
|
|
- @refresh-datas="refreshDatas" @value-changed="valueChanged($event, modelData, index)"
|
|
|
|
|
- @execute-callout="
|
|
|
|
|
|
|
+ :tab-grid-title-fields="tabGridTitleFields" :model-data="modelData"
|
|
|
|
|
+ :simple-filter-params="searchText" :complex-filter-params="complexFilterParams"
|
|
|
|
|
+ :class-name="tab.tabDataSource.className" :scroll-object="scrollObject" :js-url="jsUrl"
|
|
|
|
|
+ :model-datas="modelDatas" @delete-record="deleteRecord(modelData, true)"
|
|
|
|
|
+ @edit-record="editRecord(modelData, index)" @click-model-data="clickModelData(modelData)"
|
|
|
|
|
+ @read-record="readRecord($event, modelData, index)" @refresh-datas="refreshDatas"
|
|
|
|
|
+ @value-changed="valueChanged($event, modelData, index)" @execute-callout="
|
|
|
executeCallout($event, modelData, index)
|
|
executeCallout($event, modelData, index)
|
|
|
"
|
|
"
|
|
|
/>
|
|
/>
|
|
@@ -122,11 +117,9 @@
|
|
|
<Loading v-if="loading" />
|
|
<Loading v-if="loading" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<component
|
|
<component
|
|
|
- :is="dynamicComponent"
|
|
|
|
|
- v-if="dynamicComponentOpen"
|
|
|
|
|
- v-model:open="dynamicComponentOpen"
|
|
|
|
|
|
|
+ :is="dynamicComponent" v-if="dynamicComponentOpen" v-model:open="dynamicComponentOpen"
|
|
|
v-bind="dynamicComponentParam"
|
|
v-bind="dynamicComponentParam"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
@@ -263,7 +256,8 @@ export default {
|
|
|
dynamicComponent: null,
|
|
dynamicComponent: null,
|
|
|
dynamicComponentParam: null,
|
|
dynamicComponentParam: null,
|
|
|
dynamicComponentOpen: true,
|
|
dynamicComponentOpen: true,
|
|
|
- selectModelDatas:[],
|
|
|
|
|
|
|
+ selectModelDatas: [],
|
|
|
|
|
+ checkDatas: null,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -407,14 +401,14 @@ export default {
|
|
|
console.log(this.modelDatas.length);
|
|
console.log(this.modelDatas.length);
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 如果模态框关闭,那么刷新一下表格的数据
|
|
* 如果模态框关闭,那么刷新一下表格的数据
|
|
|
* @param currentValue
|
|
* @param currentValue
|
|
|
* @param oldValue
|
|
* @param oldValue
|
|
|
*/
|
|
*/
|
|
|
- dynamicComponentOpen: function(currentValue, oldValue){
|
|
|
|
|
- if(currentValue == false){
|
|
|
|
|
|
|
+ dynamicComponentOpen: function (currentValue, oldValue) {
|
|
|
|
|
+ if (currentValue == false) {
|
|
|
this.queryGridData(false);
|
|
this.queryGridData(false);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -512,12 +506,12 @@ export default {
|
|
|
|
|
|
|
|
beforeMount: function () { },
|
|
beforeMount: function () { },
|
|
|
|
|
|
|
|
- mounted: function () {
|
|
|
|
|
|
|
+ mounted: function () {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- getContext: Context,
|
|
|
|
|
|
|
+ getContext: Context,
|
|
|
|
|
|
|
|
// 获取当前tab为哪个阶段
|
|
// 获取当前tab为哪个阶段
|
|
|
getNowTab: function (tab) {
|
|
getNowTab: function (tab) {
|
|
@@ -903,7 +897,7 @@ export default {
|
|
|
_self.dynamicComponent = 'CurdWindowModal';
|
|
_self.dynamicComponent = 'CurdWindowModal';
|
|
|
_self.dynamicComponentOpen = true;
|
|
_self.dynamicComponentOpen = true;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// this.$router.push(
|
|
// this.$router.push(
|
|
|
// 'window-edit/create/' +
|
|
// 'window-edit/create/' +
|
|
|
// this.windowNo +
|
|
// this.windowNo +
|
|
@@ -922,8 +916,8 @@ export default {
|
|
|
function (response) {
|
|
function (response) {
|
|
|
_self.loading = false;
|
|
_self.loading = false;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- if(response.errorCode != 0){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (response.errorCode != 0) {
|
|
|
Notify.error('数据新建异常', response.errorMessage, false);
|
|
Notify.error('数据新建异常', response.errorMessage, false);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -1045,7 +1039,7 @@ export default {
|
|
|
var currIndex = (currPage - 1) * Common.pageSize + index + 1;
|
|
var currIndex = (currPage - 1) * Common.pageSize + index + 1;
|
|
|
var totalCount = _self.pagination.total;
|
|
var totalCount = _self.pagination.total;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
_self.dynamicComponentParam = {
|
|
_self.dynamicComponentParam = {
|
|
|
viewType: 'edit',
|
|
viewType: 'edit',
|
|
|
curdWindowNo: _self.windowNo,
|
|
curdWindowNo: _self.windowNo,
|
|
@@ -1060,7 +1054,7 @@ export default {
|
|
|
_self.dynamicComponent = 'CurdWindowModal';
|
|
_self.dynamicComponent = 'CurdWindowModal';
|
|
|
_self.dynamicComponentOpen = true;
|
|
_self.dynamicComponentOpen = true;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// this.$router.push(
|
|
// this.$router.push(
|
|
|
// 'window-edit/edit/' +
|
|
// 'window-edit/edit/' +
|
|
|
// this.windowNo +
|
|
// this.windowNo +
|
|
@@ -1101,74 +1095,66 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 只读
|
|
// 只读
|
|
|
- readRecord: function (modelData, index) {
|
|
|
|
|
- if (modelData.editMode == true) {
|
|
|
|
|
|
|
+ readRecord: function (isRead, modelData, index) {
|
|
|
|
|
+ var _self = this;
|
|
|
|
|
+ const readModelData = !_self.checkDatas ? modelData : _self.checkDatas.modelData;
|
|
|
|
|
+ if (readModelData.editMode == true) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (isRead) {
|
|
|
|
|
+ var currPage = _self.pagination.current_page;
|
|
|
|
|
+ var currIndex = (currPage - 1) * Common.pageSize + _self.checkDatas.index + 1;
|
|
|
|
|
+ var totalCount = _self.pagination.total;
|
|
|
|
|
|
|
|
- var _self = this;
|
|
|
|
|
-
|
|
|
|
|
- var currPage = _self.pagination.current_page;
|
|
|
|
|
- var currIndex = (currPage - 1) * Common.pageSize + index + 1;
|
|
|
|
|
- var totalCount = _self.pagination.total;
|
|
|
|
|
|
|
+ var customerWindowUrl = _self.tab.customerWindowUrl;
|
|
|
|
|
+ if (customerWindowUrl != undefined && customerWindowUrl != '') {
|
|
|
|
|
+ this.$router.push(
|
|
|
|
|
+ customerWindowUrl +
|
|
|
|
|
+ '/view/' +
|
|
|
|
|
+ this.windowNo +
|
|
|
|
|
+ '/' +
|
|
|
|
|
+ this.tabIndex +
|
|
|
|
|
+ '/' +
|
|
|
|
|
+ readModelData.id +
|
|
|
|
|
+ '?currPage=' +
|
|
|
|
|
+ currPage +
|
|
|
|
|
+ '&currIndex=' +
|
|
|
|
|
+ currIndex +
|
|
|
|
|
+ '&totalCount=' +
|
|
|
|
|
+ totalCount +
|
|
|
|
|
+ '&uuid=' +
|
|
|
|
|
+ this.uuid,
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let categoryNo; let categoryValue; let displayValue;
|
|
|
|
|
+
|
|
|
|
|
+ if (readModelData.data['category']) {
|
|
|
|
|
+ categoryValue = readModelData.data['category'];
|
|
|
|
|
+ displayValue = categoryValue['displayValue'];
|
|
|
|
|
+ } else if (readModelData.data['assetCategory']) {
|
|
|
|
|
+ categoryValue = readModelData.data['assetCategory'];
|
|
|
|
|
+ displayValue = categoryValue['displayValue'];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ categoryNo = this.windowNo;
|
|
|
|
|
+ }
|
|
|
|
|
+ categoryNo = displayValue[displayValue.length - 1];
|
|
|
|
|
|
|
|
- var customerWindowUrl = _self.tab.customerWindowUrl;
|
|
|
|
|
- if (customerWindowUrl != undefined && customerWindowUrl != '') {
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- this.$router.push(
|
|
|
|
|
- customerWindowUrl +
|
|
|
|
|
- '/view/' +
|
|
|
|
|
- this.windowNo +
|
|
|
|
|
- '/' +
|
|
|
|
|
- this.tabIndex +
|
|
|
|
|
- '/' +
|
|
|
|
|
- modelData.id +
|
|
|
|
|
- '?currPage=' +
|
|
|
|
|
- currPage +
|
|
|
|
|
- '&currIndex=' +
|
|
|
|
|
- currIndex +
|
|
|
|
|
- '&totalCount=' +
|
|
|
|
|
- totalCount +
|
|
|
|
|
- '&uuid=' +
|
|
|
|
|
- this.uuid,
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ _self.dynamicComponentParam = {
|
|
|
|
|
+ viewType: 'view',
|
|
|
|
|
+ curdWindowNo: categoryNo,
|
|
|
|
|
+ tabIndex: this.tabIndex,
|
|
|
|
|
+ modelDataId: readModelData.id,
|
|
|
|
|
+ currentPage: currPage,
|
|
|
|
|
+ currentIndex: currIndex,
|
|
|
|
|
+ totalRecords: totalCount,
|
|
|
|
|
+ isRestoreData: false,
|
|
|
|
|
+ uuid: this.uuid,
|
|
|
|
|
+ };
|
|
|
|
|
+ _self.dynamicComponent = 'CurdWindowModal';
|
|
|
|
|
+ _self.dynamicComponentOpen = true;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
-
|
|
|
|
|
- _self.dynamicComponentParam = {
|
|
|
|
|
- viewType: 'view',
|
|
|
|
|
- curdWindowNo: this.windowNo,
|
|
|
|
|
- tabIndex: this.tabIndex,
|
|
|
|
|
- modelDataId: modelData.id,
|
|
|
|
|
- currentPage: currPage,
|
|
|
|
|
- currentIndex: currIndex,
|
|
|
|
|
- totalRecords: totalCount,
|
|
|
|
|
- isRestoreData: false,
|
|
|
|
|
- uuid: this.uuid,
|
|
|
|
|
- };
|
|
|
|
|
- _self.dynamicComponent = 'CurdWindowModal';
|
|
|
|
|
- _self.dynamicComponentOpen = true;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // this.$router.push(
|
|
|
|
|
- // 'window-read/view/' +
|
|
|
|
|
- // this.windowNo +
|
|
|
|
|
- // '/' +
|
|
|
|
|
- // this.tabIndex +
|
|
|
|
|
- // '/' +
|
|
|
|
|
- // modelData.id +
|
|
|
|
|
- // '?currPage=' +
|
|
|
|
|
- // currPage +
|
|
|
|
|
- // '&currIndex=' +
|
|
|
|
|
- // currIndex +
|
|
|
|
|
- // '&totalCount=' +
|
|
|
|
|
- // totalCount +
|
|
|
|
|
- // '&uuid=' +
|
|
|
|
|
- // this.uuid,
|
|
|
|
|
- // );
|
|
|
|
|
|
|
+ _self.checkDatas = { modelData, index };
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -1434,9 +1420,9 @@ export default {
|
|
|
if (modelData.select === true) {
|
|
if (modelData.select === true) {
|
|
|
this.selectModelDatas.push(modelData);
|
|
this.selectModelDatas.push(modelData);
|
|
|
} else {
|
|
} else {
|
|
|
- this.selectModelDatas.forEach((item,index) =>{
|
|
|
|
|
- if(item.id=== modelData.id) {
|
|
|
|
|
- this.selectModelDatas.splice(index,1);
|
|
|
|
|
|
|
+ this.selectModelDatas.forEach((item, index) => {
|
|
|
|
|
+ if (item.id === modelData.id) {
|
|
|
|
|
+ this.selectModelDatas.splice(index, 1);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|