fix error
This commit is contained in:
+11
-74
@@ -31,10 +31,7 @@
|
||||
ذخیره اطلاعات
|
||||
</a-button>
|
||||
|
||||
|
||||
</a-tab-pane>
|
||||
|
||||
|
||||
<a-tab-pane key="2" tab="دسته های آموزشی">
|
||||
<input
|
||||
v-if="inputVisible"
|
||||
@@ -52,11 +49,7 @@
|
||||
<a-icon type="plus" /> افزودن دسته جدید آموزشی
|
||||
</a-tag>
|
||||
<template v-for="(tag, index) in tags">
|
||||
<!-- <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
|
||||
<a-tag :key="tag" :closable="index !== 0" @close="() => handleClose(tag)">
|
||||
{{ `${tag.slice(0, 20)}...` }}
|
||||
</a-tag>
|
||||
</a-tooltip>-->
|
||||
|
||||
<a-tag :key="tag" :closable="true" @close="() => handleClose(tag)">
|
||||
{{ tag }}
|
||||
</a-tag>
|
||||
@@ -65,21 +58,9 @@
|
||||
<a-button type="primary" class="mt-10" @click="saveCategory()">
|
||||
ذخیره اطلاعات
|
||||
</a-button>
|
||||
<!-- <template v-for="(item, index) in category">
|
||||
<!– <a-tooltip v-if="tag.length > 20" :key="tag" :title="tag">
|
||||
<a-tag :key="tag" :closable="index !== 0" @close="() => handleClose(tag)">
|
||||
{{ `${tag.slice(0, 20)}...` }}
|
||||
</a-tag>
|
||||
</a-tooltip>–>
|
||||
|
||||
|
||||
|
||||
<a-tag :key="item" :closable="index !== 0" @close="() => handleClose(item)">
|
||||
{{ item }}
|
||||
</a-tag>
|
||||
</template>-->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="1" tab="مدیریت شهرها">
|
||||
<a-tab-pane key="1" tab="شغل ها">
|
||||
<div>
|
||||
<!-- <a-card title="شهرهای محل همکاری" :bordered="true" >
|
||||
<a-form :form="formCities" @submit="handleSubmitCities">
|
||||
@@ -215,51 +196,7 @@
|
||||
</template>
|
||||
</x-table>
|
||||
|
||||
<!-- <ATable
|
||||
class="mt-5"
|
||||
:pagination="true"
|
||||
bordered
|
||||
:locale="{emptyText:'داده ای یافت نشد'}"
|
||||
:columns="cols" :data-source="jobs">
|
||||
|
||||
|
||||
<template slot="cities_str_slot" slot-scope="items">
|
||||
<a-tag v-for="item,index in items" :key="index" >{{item}}</a-tag>
|
||||
</template>
|
||||
|
||||
<template slot="operator" slot-scope="id">
|
||||
|
||||
<a-tooltip placement="bottomLeft">
|
||||
<template slot="title">
|
||||
<span>حذف</span>
|
||||
</template>
|
||||
<a-popconfirm
|
||||
title="آیا می خواهید حذف کنید؟"
|
||||
ok-text="بله"
|
||||
cancel-text="خیر"
|
||||
@confirm="okDelete(id)"
|
||||
>
|
||||
<a-button type="danger" class="mr-3">
|
||||
حذف
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</a-tooltip>
|
||||
|
||||
<a-button type="primary" @click="showEditModal(id)" >
|
||||
ویرایش
|
||||
</a-button>
|
||||
</template>
|
||||
<!– <a-button type="primary">
|
||||
Primary
|
||||
</a-button>–>
|
||||
|
||||
</ATable>-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</a-tab-pane>
|
||||
</a-tab-pane>
|
||||
|
||||
<!-- <a-tab-pane key="1" tab="پیکربندی سیستم">
|
||||
<a-checkbox v-model="global" style="direction: rtl">
|
||||
@@ -313,10 +250,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//import * as TableCol from "./jobCols";
|
||||
//import * from TblJobs from "./pe"
|
||||
/*import * as TableCol from './jobTbl';*/
|
||||
//import XTable from "@/components/x-table/XTable";
|
||||
|
||||
import * as TableCol from './jobTbl';
|
||||
import XTable from "@/components/x-table/XTable";
|
||||
|
||||
@@ -346,7 +280,8 @@
|
||||
form: this.$form.createForm(this, {name: 'coordinated'}),
|
||||
fromJobEdit: this.$form.createForm(this, {name: 'coordinated'}),
|
||||
formCities:this.$form.createForm(this, {name: 'coordinated'}),
|
||||
defaultCity:[]
|
||||
defaultCity:[],
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -374,6 +309,7 @@
|
||||
axios.post('/add-city',{cities:this.configCities})
|
||||
.then((res)=>{
|
||||
//console.log(res.data);
|
||||
this.cities=res.data;
|
||||
this.configCities=res.data.map((item)=>{ return {id:item.id,title:item.title} });
|
||||
this.$message.success('اطلاعات با موفقیت ثبت شد');
|
||||
//this.getJobs();
|
||||
@@ -392,16 +328,17 @@
|
||||
if(removedTag!=null)
|
||||
{
|
||||
axios.post('/remove-city',{id:removedTag}).then((res)=>{
|
||||
|
||||
this.cities=res.data;
|
||||
this.configCities=res.data.map((item)=>{ return {id:item.id,title:item.title} });
|
||||
});
|
||||
}
|
||||
let index=this.configCities.findIndex((item)=> {
|
||||
/* let index=this.configCities.findIndex((item)=> {
|
||||
return item.id==removedTag;
|
||||
});
|
||||
|
||||
if(index>-1){
|
||||
this.configCities.splice(index,1);
|
||||
}
|
||||
}*/
|
||||
},
|
||||
showInput() {
|
||||
this.inputVisible = true;
|
||||
|
||||
Reference in New Issue
Block a user