🐞 fix(标签): 修改联调问题

dev
zjb 10 months ago
parent 32577f3cd7
commit afc89ccad7

@ -13,11 +13,10 @@ export default {
*/ */
getList(data, pageNum, pageSize) { getList(data, pageNum, pageSize) {
return request({ return request({
// url: `/luoo-tag/tag/list?pageNum=${pageNum}&pageSize=${pageSize}`,
url: `/luoo-tag/tag/list`, url: `/luoo-tag/tag/list`,
method: "get", method: "get",
params:{ params: {
... data, ...data,
pageNum, pageNum,
pageSize pageSize
} }
@ -81,5 +80,25 @@ export default {
url: `/luoo-tag/tag/${id}`, url: `/luoo-tag/tag/${id}`,
method: "delete" method: "delete"
}); });
},
/**
* 创建人
* @returns
*/
createrList() {
return request({
url: "/luoo-tag/tag/creator/list",
method: "get"
});
},
/**
* 创建人
* @returns
*/
parentNameList() {
return request({
url: "/luoo-tag/tag/name",
method: "get"
});
} }
}; };

@ -35,9 +35,7 @@
size="medium" size="medium"
v-model="queryForm.data.parentId" v-model="queryForm.data.parentId"
> >
<el-option label="民谣" value="1744043047018172416"></el-option> <el-option v-for="item in queryForm.remoteData.parentTag" :label="item.nameCh" :value="item.id" :key="item.id"></el-option>
<el-option label="摇滚" value="1744044157997027328"></el-option>
<el-option label="流行" value="1746150704759836672"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -46,8 +44,12 @@
size="medium" size="medium"
v-model="queryForm.data.creatorId" v-model="queryForm.data.creatorId"
> >
<el-option label="发布人1" value="1"></el-option> <el-option
<el-option label="发布人2" value="2"></el-option> v-for="item in queryForm.remoteData.publisher"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -55,7 +57,9 @@
placeholder="选择时间范围" placeholder="选择时间范围"
v-model="queryForm.data.timeRange" v-model="queryForm.data.timeRange"
type="daterange" type="daterange"
:range-separator="queryForm.data.timeRange.length === 0 ? null : '~'" :range-separator="
queryForm.data.timeRange.length === 0 ? null : '~'
"
:editable="false" :editable="false"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -120,7 +124,7 @@
<el-table-column label="歌曲数" prop="songRefCount"></el-table-column> <el-table-column label="歌曲数" prop="songRefCount"></el-table-column>
<el-table-column <el-table-column
label="关联期刊数" label="关联期刊数"
prop="articleRefCount" prop="columnRefCount"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="子标签数" label="子标签数"
@ -235,9 +239,7 @@
size="medium" size="medium"
v-model="modifyDialog.form.data.parentId" v-model="modifyDialog.form.data.parentId"
> >
<el-option label="民谣" value="1744043047018172416"></el-option> <el-option v-for="item in queryForm.remoteData.parentTag" :label="item.nameCh" :value="item.id" :key="item.id"></el-option>
<el-option label="摇滚" value="1744044157997027328"></el-option>
<el-option label="流行" value="1746150704759836672"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="中文名称" prop="nameCh"> <el-form-item label="中文名称" prop="nameCh">
@ -275,7 +277,8 @@ export default {
// //
queryForm: { queryForm: {
remoteData: { remoteData: {
publisher: [] publisher: [],
parentTag: []
}, },
lastQuery: {}, lastQuery: {},
data: { data: {
@ -323,6 +326,8 @@ export default {
}, },
filters: {}, filters: {},
created() { created() {
this.fetchCreaterList();
this.fetchParentNameList();
this.fetchData(this.queryForm.data); this.fetchData(this.queryForm.data);
}, },
methods: { methods: {
@ -340,29 +345,47 @@ export default {
let queryParam = { let queryParam = {
...param ...param
}; };
// if (this.queryForm.data.timeRange) { if (this.queryForm.data.timeRange) {
// if (this.queryForm.data.timeRange[0]) { if (this.queryForm.data.timeRange[0]) {
// queryParam.createTimeStart = queryParam.createTimeStart =
// this.queryForm.data.timeRange[0] + " 00:00:00"; this.queryForm.data.timeRange[0] + " 00:00:00";
// } }
// if (this.queryForm.data.timeRange[1]) { if (this.queryForm.data.timeRange[1]) {
// queryParam.createTimeEnd = queryParam.createTimeEnd =
// this.queryForm.data.timeRange[1] + " 23:59:59"; this.queryForm.data.timeRange[1] + " 23:59:59";
// } }
// } }
this.table.loading = true; this.table.loading = true;
this.table.page.total = 0;
this.table.data = []; this.table.data = [];
tagApi tagApi
.getList(queryParam, this.table.page.current, this.table.page.size) .getList(queryParam, this.table.page.current, this.table.page.size)
.then(res => { .then(res => {
this.table.data = res.data.content; this.table.data = res.data.rows;
this.table.page.total = res.data.totalElements; this.table.page.total = res.data.total;
this.table.page.current = res.data.number + 1;
this.table.loading = false; this.table.loading = false;
}); });
}, },
/**
* 创建人下拉框
*/
fetchCreaterList() {
tagApi.createrList().then(res => {
if (res.code === 200) {
this.queryForm.remoteData.publisher = res.data;
}
});
},
/**
* 父级名称下拉框
*/
fetchParentNameList() {
tagApi.parentNameList().then(res => {
if (res.code === 200) {
this.queryForm.remoteData.parentTag = res.data;
}
});
},
// ************************* ************************* // ************************* *************************
/** /**
* 查询按扭点击事件 * 查询按扭点击事件

Loading…
Cancel
Save