|
|
|
@ -1,44 +1,13 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
<div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div> |
|
|
|
<span @click="favoriteFunction()"> |
|
|
|
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg" ></icon-svg> |
|
|
|
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label1"> |
|
|
|
<el-input style="width: 100px;" v-model="queryHeaderData.locationId" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
|
<el-input style="width: 100px;" v-model="queryHeaderData.locationName" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label3"> |
|
|
|
<el-select v-model="queryHeaderData.warehouseId" placeholder="请选择" style="width: 115px;"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="item in selectList.select2" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label4"> |
|
|
|
<el-select v-model="queryHeaderData.active" placeholder="请选择" style="width: 115px;"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="item in selectList.select1" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 20px;"> |
|
|
|
</div> |
|
|
|
<el-button @click="getDataList()" type="primary">{{buttons.search}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item style="margin-top: 20px;"> |
|
|
|
<el-button @click="initModel()" type="primary">{{buttons.add}}</el-button> |
|
|
|
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}} |
|
|
|
</el-button> |
|
|
|
@ -62,73 +31,20 @@ |
|
|
|
<el-button v-if="isAuth(':prd:delete')" type="danger" @click="deleteHandle()" |
|
|
|
:disabled="dataListSelections.length <= 0">{{ buttons.deleteList}} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
id="commmon" |
|
|
|
:height="height" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@selection-change="selectionChangeHandle" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="90" |
|
|
|
:label="buttons.cz"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a @click="initModel(scope.row)">{{buttons.edit}}</a> |
|
|
|
<a @click="delHeaderData(scope.row)">{{buttons.delete}}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
@current-change="currentChangeHandle" |
|
|
|
:current-page="pageIndex" |
|
|
|
:page-sizes="[100, 200, 500]" |
|
|
|
:page-size="pageSize" |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag :title="inputLabel.headerInput.label5" :visible.sync="setUp.reviewFlag" width="325px"> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label1"> |
|
|
|
<el-input style="width: 130px;" :readonly = "setUp.readonlyFlag?'readonly':false" oninput="this.value = this.value.toUpperCase()" v-model="saveHeaderData.locationId"></el-input> |
|
|
|
<el-input style="width: 100px;" v-model="queryHeaderData.locationId"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
|
<el-input style="width: 130px;" v-model="saveHeaderData.locationName"></el-input> |
|
|
|
<el-input style="width: 100px;" v-model="queryHeaderData.locationName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label3"> |
|
|
|
<el-select v-model="saveHeaderData.warehouseId" placeholder="请选择" style="width: 130px;"> |
|
|
|
<el-select v-model="queryHeaderData.warehouseId" placeholder="请选择" style="width: 115px;"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="item in selectList.select2" |
|
|
|
:key="item.value" |
|
|
|
@ -138,7 +54,8 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label4"> |
|
|
|
<el-select v-model="saveHeaderData.active" placeholder="请选择" style="width: 130px;"> |
|
|
|
<el-select v-model="queryHeaderData.active" placeholder="请选择" style="width: 115px;"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="item in selectList.select1" |
|
|
|
:key="item.value" |
|
|
|
@ -148,18 +65,105 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="setUp.reviewFlag = false">取消</el-button> |
|
|
|
<el-button type="primary" :disabled="setUp.saveButton" @click="saveHeaderFunction()">确定</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-table |
|
|
|
id="commmon" |
|
|
|
:height="height" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@selection-change="selectionChangeHandle" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="90" |
|
|
|
:label="buttons.cz"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a @click="initModel(scope.row)">{{buttons.edit}}</a> |
|
|
|
<a @click="delHeaderData(scope.row)">{{buttons.delete}}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
@current-change="currentChangeHandle" |
|
|
|
:current-page="pageIndex" |
|
|
|
:page-sizes="[100, 200, 500]" |
|
|
|
:page-size="pageSize" |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
|
|
|
|
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag |
|
|
|
:title="inputLabel.headerInput.label5" :visible.sync="setUp.reviewFlag" width="325px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label1"> |
|
|
|
<el-input style="width: 130px;" :readonly="setUp.readonlyFlag?'readonly':false" |
|
|
|
oninput="this.value = this.value.toUpperCase()" v-model="saveHeaderData.locationId"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
|
<el-input style="width: 130px;" v-model="saveHeaderData.locationName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label3"> |
|
|
|
<el-select v-model="saveHeaderData.warehouseId" placeholder="请选择" style="width: 130px;"> |
|
|
|
<el-option |
|
|
|
v-for="item in selectList.select2" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="inputLabel.headerInput.label4"> |
|
|
|
<el-select v-model="saveHeaderData.active" placeholder="请选择" style="width: 130px;"> |
|
|
|
<el-option |
|
|
|
v-for="item in selectList.select1" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" :disabled="setUp.saveButton" @click="saveHeaderFunction()">确定</el-button> |
|
|
|
<el-button type="primary" @click="setUp.reviewFlag = false">取消</el-button> |
|
|
|
|
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
import column from "../common/column"; |
|
|
|
import column from "../common/column"; |
|
|
|
import { |
|
|
|
searchSysLanguagePackList, |
|
|
|
searchSysLanguageParam, |
|
|
|
@ -183,44 +187,45 @@ import column from "../common/column"; |
|
|
|
saveUserFavorite, |
|
|
|
removeUserFavorite, |
|
|
|
} from '@/api/userFavorite.js' |
|
|
|
import { |
|
|
|
getWarehouseList, |
|
|
|
getLocationList, |
|
|
|
saveLocation, |
|
|
|
delLocation, |
|
|
|
} from '@/api/warehouse/location.js' |
|
|
|
import { |
|
|
|
getWarehouseList, |
|
|
|
getLocationList, |
|
|
|
saveLocation, |
|
|
|
delLocation, |
|
|
|
} from '@/api/warehouse/location.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
column |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
saveHeaderData :{ |
|
|
|
locationId : '', |
|
|
|
locationName : '', |
|
|
|
warehouseId : '', |
|
|
|
active : '', |
|
|
|
saveHeaderData: { |
|
|
|
locationId: '', |
|
|
|
locationName: '', |
|
|
|
warehouseId: '', |
|
|
|
active: '', |
|
|
|
}, |
|
|
|
queryHeaderData : { |
|
|
|
site : this.$store.state.user.site, |
|
|
|
locationId : '', |
|
|
|
locationName : '', |
|
|
|
warehouseId : '', |
|
|
|
active : '', |
|
|
|
queryHeaderData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
locationId: '', |
|
|
|
locationName: '', |
|
|
|
warehouseId: '', |
|
|
|
active: '', |
|
|
|
}, |
|
|
|
setUp: { |
|
|
|
reviewFlag: false, |
|
|
|
saveButton: false, |
|
|
|
reviewFlag1 : false, |
|
|
|
readonlyFlag : false, |
|
|
|
reviewFlag1: false, |
|
|
|
readonlyFlag: false, |
|
|
|
}, |
|
|
|
inputLabel :{ |
|
|
|
headerInput : { |
|
|
|
label1 : '库位编码', |
|
|
|
label2 : '库位名称', |
|
|
|
label3 : '仓库名称', |
|
|
|
label4 : '状态', |
|
|
|
label5 : '库位信息', |
|
|
|
inputLabel: { |
|
|
|
headerInput: { |
|
|
|
label1: '库位编码', |
|
|
|
label2: '库位名称', |
|
|
|
label3: '仓库名称', |
|
|
|
label4: '状态', |
|
|
|
label5: '库位信息', |
|
|
|
}, |
|
|
|
}, |
|
|
|
selectList: { |
|
|
|
@ -233,10 +238,10 @@ import { |
|
|
|
}], |
|
|
|
select2: [], |
|
|
|
}, |
|
|
|
site : this.$store.state.user.site, |
|
|
|
userName : this.$store.state.user.name, |
|
|
|
site: this.$store.state.user.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
// table高度 |
|
|
|
height:450, |
|
|
|
height: 450, |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
addLanguage: false, |
|
|
|
@ -538,8 +543,8 @@ import { |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.height = window.innerHeight - 200; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 220; |
|
|
|
}) |
|
|
|
}, |
|
|
|
activated() { |
|
|
|
@ -548,15 +553,15 @@ import { |
|
|
|
this.getLanguageList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getSelectList(){ |
|
|
|
getSelectList() { |
|
|
|
let jsonData = { |
|
|
|
site : this.site, |
|
|
|
active : 'Y' |
|
|
|
site: this.site, |
|
|
|
active: 'Y' |
|
|
|
} |
|
|
|
this.selectList.select2 = [] |
|
|
|
getWarehouseList(jsonData).then(({data}) =>{ |
|
|
|
getWarehouseList(jsonData).then(({data}) => { |
|
|
|
let list = data.rows |
|
|
|
if(list.length > 0){ |
|
|
|
if (list.length > 0) { |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
let selectData = { |
|
|
|
value: list[i].wareHouseId, |
|
|
|
@ -567,21 +572,21 @@ import { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
delHeaderData(row){ |
|
|
|
delHeaderData(row) { |
|
|
|
this.$confirm(`确定删除该记录?`, '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let jsonData ={ |
|
|
|
site : row.site, |
|
|
|
locationId : row.locationId, |
|
|
|
let jsonData = { |
|
|
|
site: row.site, |
|
|
|
locationId: row.locationId, |
|
|
|
} |
|
|
|
delLocation(jsonData).then(({data}) =>{ |
|
|
|
if(data.code == 0){ |
|
|
|
delLocation(jsonData).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.getDataList() |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
@ -592,40 +597,25 @@ import { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveHeaderFunction(){ |
|
|
|
saveHeaderFunction() { |
|
|
|
this.setUp.saveButton = true |
|
|
|
if(this.saveHeaderData.locationId == ''){ |
|
|
|
this.$alert("请输入库位编码!", '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
this.setUp.saveButton = false |
|
|
|
} |
|
|
|
}); |
|
|
|
return |
|
|
|
}else if(this.saveHeaderData.locationName == ''){ |
|
|
|
this.$alert("请输入库位名称!", '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
this.setUp.saveButton = false |
|
|
|
} |
|
|
|
}); |
|
|
|
if (!this.saveHeaderData.locationId) { |
|
|
|
this.$message.warning('请输入库位编码!') |
|
|
|
this.setUp.saveButton = false |
|
|
|
return |
|
|
|
}else if(this.saveHeaderData.warehouseId == ''){ |
|
|
|
this.$alert("请选择库房名称!", '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
this.setUp.saveButton = false |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
if (!this.saveHeaderData.warehouseId) { |
|
|
|
this.$message.warning('请选择仓库名称!') |
|
|
|
this.setUp.saveButton = false |
|
|
|
return |
|
|
|
} |
|
|
|
saveLocation(this.saveHeaderData).then(({data}) =>{ |
|
|
|
saveLocation(this.saveHeaderData).then(({data}) => { |
|
|
|
this.setUp.saveButton = false |
|
|
|
if(data.code == 0){ |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.getDataList() |
|
|
|
this.setUp.reviewFlag = false |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '操作提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
@ -635,8 +625,8 @@ import { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
initModel(row){ |
|
|
|
console.log("1 =" +row) |
|
|
|
initModel(row) { |
|
|
|
console.log("1 =" + row) |
|
|
|
this.setUp.reviewFlag = true |
|
|
|
this.setUp.saveButton = false |
|
|
|
this.setUp.readonlyFlag = false |
|
|
|
@ -646,8 +636,8 @@ import { |
|
|
|
this.saveHeaderData.locationName = '' |
|
|
|
this.saveHeaderData.warehouseId = '' |
|
|
|
this.saveHeaderData.active = 'Y' |
|
|
|
if(row){ |
|
|
|
console.log("2 =" +row) |
|
|
|
if (row) { |
|
|
|
console.log("2 =" + row) |
|
|
|
this.setUp.readonlyFlag = true |
|
|
|
this.saveHeaderData.id = 1 |
|
|
|
this.saveHeaderData.locationId = row.locationId |
|
|
|
@ -658,8 +648,8 @@ import { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 打印方式 |
|
|
|
printReport(){ |
|
|
|
alert( this.$store.state.user.site) |
|
|
|
printReport() { |
|
|
|
alert(this.$store.state.user.site) |
|
|
|
// |
|
|
|
// const LODOP = getLodop() |
|
|
|
// if (LODOP) { |
|
|
|
@ -682,41 +672,41 @@ import { |
|
|
|
// } |
|
|
|
}, |
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk(){ |
|
|
|
let userFavorite ={ |
|
|
|
userId:this.$store.state.user.id, |
|
|
|
languageCode:this.$i18n.locale |
|
|
|
favoriteIsOk() { |
|
|
|
let userFavorite = { |
|
|
|
userId: this.$store.state.user.id, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
userFavoriteList(userFavorite).then(({data}) =>{ |
|
|
|
let size = data.list.filter(item => item.userId==userFavorite.menuId).length; |
|
|
|
if (size>0){ |
|
|
|
userFavoriteList(userFavorite).then(({data}) => { |
|
|
|
let size = data.list.filter(item => item.userId == userFavorite.menuId).length; |
|
|
|
if (size > 0) { |
|
|
|
this.favorite = true |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.favorite = false |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 收藏 OR 取消收藏 |
|
|
|
favoriteFunction(){ |
|
|
|
let userFavorite ={ |
|
|
|
favoriteFunction() { |
|
|
|
let userFavorite = { |
|
|
|
userId: this.$store.state.user.id, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
} |
|
|
|
if (this.favorite){ |
|
|
|
if (this.favorite) { |
|
|
|
// 取消收藏 |
|
|
|
this.$confirm(`确定取消收藏`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
removeUserFavorite(userFavorite).then(({data})=>{ |
|
|
|
removeUserFavorite(userFavorite).then(({data}) => { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.favorite = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
// 收藏 |
|
|
|
saveUserFavorite(userFavorite).then(({data})=>{ |
|
|
|
saveUserFavorite(userFavorite).then(({data}) => { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.favorite = true |
|
|
|
}) |
|
|
|
@ -732,7 +722,7 @@ import { |
|
|
|
// 获取button的词典 |
|
|
|
getFunctionButtonList() { |
|
|
|
searchFunctionButtonList(this.queryButton).then(({data}) => { |
|
|
|
if (JSON.stringify(data.data) != '{}' ) { |
|
|
|
if (JSON.stringify(data.data) != '{}') { |
|
|
|
this.buttons = data.data |
|
|
|
} else { |
|
|
|
// saveButtonList(this.buttonList).then(({data}) => { |
|
|
|
@ -782,7 +772,7 @@ import { |
|
|
|
await removerDefault(this.queryTable) |
|
|
|
// 保存页面 table属性 |
|
|
|
let sumColumnList = this.columnList.concat(this.columnList1); |
|
|
|
sumColumnList = sumColumnList.map(item=> { |
|
|
|
sumColumnList = sumColumnList.map(item => { |
|
|
|
return item = { |
|
|
|
tableId: item.tableId, |
|
|
|
tableName: item.tableName, |
|
|
|
@ -803,9 +793,9 @@ import { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
await saveTableDefaultList(sumColumnList) |
|
|
|
// 保存页面 button label title 属性 |
|
|
|
let buttons = this.buttonList.map( item => { |
|
|
|
let buttons = this.buttonList.map(item => { |
|
|
|
return item = { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
languageValue: item.languageValue, |
|
|
|
@ -825,7 +815,7 @@ import { |
|
|
|
// this.showDefault = false |
|
|
|
this.columnList = data.rows |
|
|
|
} else { |
|
|
|
// this.showDefault = true |
|
|
|
// this.showDefault = true |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -875,7 +865,7 @@ import { |
|
|
|
data: this.$http.adornData(ids, false) |
|
|
|
}).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('操作成功') |
|
|
|
this.$message.success('操作成功') |
|
|
|
this.getDataList() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
@ -884,29 +874,29 @@ import { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
fields(){ |
|
|
|
let json = "{" |
|
|
|
this.columnList.forEach((item,index) =>{ |
|
|
|
if (index == this.columnList.length-1 ){ |
|
|
|
json +="\""+item.columnLabel+"\"" +":"+"\""+item.columnProp+"\"" |
|
|
|
}else { |
|
|
|
json += "\""+item.columnLabel+"\"" +":"+"\""+item.columnProp+"\""+ "," |
|
|
|
fields() { |
|
|
|
let json = "{" |
|
|
|
this.columnList.forEach((item, index) => { |
|
|
|
if (index == this.columnList.length - 1) { |
|
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
|
|
|
} else { |
|
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
|
|
|
} |
|
|
|
}) |
|
|
|
json +="}" |
|
|
|
json += "}" |
|
|
|
let s = eval("(" + json + ")") |
|
|
|
return s |
|
|
|
}, |
|
|
|
createExportData() { |
|
|
|
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|
|
|
// TODO:构造需要下载的数据返回 |
|
|
|
if(this.dataListSelections.length>0){ |
|
|
|
if (this.dataListSelections.length > 0) { |
|
|
|
return this.dataListSelections; |
|
|
|
} |
|
|
|
return this.dataList; |
|
|
|
}, |
|
|
|
startDownload() { |
|
|
|
// this.exportData = this.dataList |
|
|
|
// this.exportData = this.dataList |
|
|
|
|
|
|
|
}, |
|
|
|
finishDownload() { |
|
|
|
@ -921,10 +911,11 @@ import { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped > |
|
|
|
.wrapper { |
|
|
|
height: calc(100% - 40px); |
|
|
|
} |
|
|
|
<style scoped> |
|
|
|
.wrapper { |
|
|
|
height: calc(100% - 40px); |
|
|
|
} |
|
|
|
|
|
|
|
.sl-input { |
|
|
|
background-color: transparent; |
|
|
|
border: 0 !important; |
|
|
|
@ -940,7 +931,8 @@ import { |
|
|
|
outline: none; |
|
|
|
|
|
|
|
} |
|
|
|
.sl-svg{ |
|
|
|
|
|
|
|
.sl-svg { |
|
|
|
overflow: hidden; |
|
|
|
float: right; |
|
|
|
} |
|
|
|
|