|
|
@ -355,7 +355,7 @@ export default {
|
|
|
|
let queryParam = {
|
|
|
|
let queryParam = {
|
|
|
|
...param
|
|
|
|
...param
|
|
|
|
};
|
|
|
|
};
|
|
|
|
queryParam.level = this.tagType
|
|
|
|
queryParam.level = this.tagType;
|
|
|
|
if (param.timeRange) {
|
|
|
|
if (param.timeRange) {
|
|
|
|
if (param.timeRange[0]) {
|
|
|
|
if (param.timeRange[0]) {
|
|
|
|
queryParam.createTimeStart = param.timeRange[0] + " 00:00:00";
|
|
|
|
queryParam.createTimeStart = param.timeRange[0] + " 00:00:00";
|
|
|
@ -392,14 +392,14 @@ export default {
|
|
|
|
tagApi.parentNameList().then(res => {
|
|
|
|
tagApi.parentNameList().then(res => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (!res.data) {
|
|
|
|
if (!res.data) {
|
|
|
|
this.queryForm.remoteData.parentTag = []
|
|
|
|
this.queryForm.remoteData.parentTag = [];
|
|
|
|
return
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let newList = []
|
|
|
|
let newList = [];
|
|
|
|
for (let index in res.data) {
|
|
|
|
for (let index in res.data) {
|
|
|
|
if (res.data[index].level === 1) {
|
|
|
|
if (res.data[index].level === 1) {
|
|
|
|
newList.push(res.data[index])
|
|
|
|
newList.push(res.data[index]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.queryForm.remoteData.parentTag = newList;
|
|
|
|
this.queryForm.remoteData.parentTag = newList;
|
|
|
@ -511,9 +511,18 @@ export default {
|
|
|
|
handleDialogSubmit() {
|
|
|
|
handleDialogSubmit() {
|
|
|
|
this.$refs.modifyDialogForm.validate(valid => {
|
|
|
|
this.$refs.modifyDialogForm.validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
let data = {
|
|
|
|
|
|
|
|
nameCh: this.modifyDialog.form.data["nameCh"],
|
|
|
|
|
|
|
|
nameEn: this.modifyDialog.form.data["nameEn"],
|
|
|
|
|
|
|
|
parentId:
|
|
|
|
|
|
|
|
this.modifyDialog.form.data["parentId"] === null ||
|
|
|
|
|
|
|
|
this.modifyDialog.form.data["parentId"] === undefined
|
|
|
|
|
|
|
|
? ""
|
|
|
|
|
|
|
|
: this.modifyDialog.form.data["parentId"]
|
|
|
|
|
|
|
|
};
|
|
|
|
// 新增
|
|
|
|
// 新增
|
|
|
|
if (this.modifyDialog.type === 0) {
|
|
|
|
if (this.modifyDialog.type === 0) {
|
|
|
|
tagApi.create(this.modifyDialog.form.data).then(res => {
|
|
|
|
tagApi.create(data).then(res => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
this.$message.success(res.message);
|
|
|
|
this.$message.success(res.message);
|
|
|
|
this.modifyDialog.visible = false;
|
|
|
|
this.modifyDialog.visible = false;
|
|
|
@ -530,7 +539,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑
|
|
|
|
// 编辑
|
|
|
|
if (this.modifyDialog.type === 1) {
|
|
|
|
if (this.modifyDialog.type === 1) {
|
|
|
|
tagApi.update(this.modifyDialog.form.data).then(res => {
|
|
|
|
tagApi.update(this.modifyDialog.form.data.id, data).then(res => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
this.$message.success(res.message);
|
|
|
|
this.$message.success(res.message);
|
|
|
|
this.modifyDialog.visible = false;
|
|
|
|
this.modifyDialog.visible = false;
|
|
|
@ -544,7 +553,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
// 新增二级
|
|
|
|
// 新增二级
|
|
|
|
if (this.modifyDialog.type === 2) {
|
|
|
|
if (this.modifyDialog.type === 2) {
|
|
|
|
tagApi.create(this.modifyDialog.form.data).then(res => {
|
|
|
|
tagApi.create(data).then(res => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
this.$message.success(res.message);
|
|
|
|
this.$message.success(res.message);
|
|
|
|
this.modifyDialog.visible = false;
|
|
|
|
this.modifyDialog.visible = false;
|
|
|
|