24 行
935 B
JavaScript
24 行
935 B
JavaScript
define([], function () {
|
|
'use strict';
|
|
return {
|
|
data: function () { return { siteOptions: Config.granarySites || [], formSite: '' }; },
|
|
computed: {
|
|
siteGranaries: function () {
|
|
var site = this.formSite;
|
|
return (this.granaryList || []).filter(function (g) { return site && g.site === site; });
|
|
}
|
|
},
|
|
methods: {
|
|
siteChanged: function () {
|
|
this.currentPage = 1;
|
|
this.search.gid = '';
|
|
this.search.rid = '';
|
|
this.multipleSelection = [];
|
|
this.loadData(this.search.keyword, 1, this.pageSize, this.search.sort);
|
|
},
|
|
formSiteChanged: function () { this.formData.gid = ''; },
|
|
granaryLabel: function (g) { return g.label || ((g.site === 'xishui' ? '习水库' : '遵义中心库') + ' · ' + g.name); }
|
|
}
|
|
};
|
|
});
|