Centralize API base URL in config and add missing ant-design icons.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
"lint": "node ./node_modules/@vue/cli-service/bin/vue-cli-service.js lint"
|
"lint": "node ./node_modules/@vue/cli-service/bin/vue-cli-service.js lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ant-design/icons": "^2.1.1",
|
||||||
"@chenfengyuan/vue-countdown": "^1.1.2",
|
"@chenfengyuan/vue-countdown": "^1.1.2",
|
||||||
"ag-grid-community": "^21.0.1",
|
"ag-grid-community": "^21.0.1",
|
||||||
"ag-grid-vue": "^21.0.1",
|
"ag-grid-vue": "^21.0.1",
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import store from '@/store/store'
|
import store from '@/store/store'
|
||||||
|
import { API_BASE_URL } from '@/config'
|
||||||
|
|
||||||
const domain = ""
|
const domain = ""
|
||||||
// import themeConfig from '@/../themeConfig.js'
|
// import themeConfig from '@/../themeConfig.js'
|
||||||
@@ -20,7 +21,7 @@ const headers = {
|
|||||||
|
|
||||||
|
|
||||||
var myax= new axios.create({
|
var myax= new axios.create({
|
||||||
baseURL: 'http://hr.asco-intl.com:2020/kernel/api/',
|
baseURL: `${API_BASE_URL}/`,
|
||||||
headers,
|
headers,
|
||||||
// domain
|
// domain
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ function getBase64(file) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//import themeConfig from "../../../../themeConfig";
|
import { API_BASE_URL } from '@/config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadInput',
|
name: 'UploadInput',
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: 'http://hr.asco-intl.com:2020/kernel/api/register/upload',
|
url: `${API_BASE_URL}/register/upload`,
|
||||||
previewVisible: false,
|
previewVisible: false,
|
||||||
previewImage: '',
|
previewImage: '',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
// آدرس API — برای تغییر دامنه یا پورت فقط همین فایل را ویرایش کنید
|
||||||
|
export const API_HOST = 'http://hr.asco-intl.com:2020'
|
||||||
|
export const API_BASE_URL = `${API_HOST}/kernel/api`
|
||||||
@@ -23,8 +23,10 @@ Vue.use(Antd)
|
|||||||
|
|
||||||
// axios
|
// axios
|
||||||
import axios from './axios.js'
|
import axios from './axios.js'
|
||||||
|
import { API_BASE_URL } from '@/config'
|
||||||
|
|
||||||
Vue.prototype.$http = axios
|
Vue.prototype.$http = axios
|
||||||
|
Vue.prototype.$apiBase = API_BASE_URL
|
||||||
|
|
||||||
// API Calls
|
// API Calls
|
||||||
/*import './http/requests'*/
|
/*import './http/requests'*/
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
||||||
import store from '@/store/store'
|
import store from '@/store/store'
|
||||||
|
import { API_BASE_URL } from '@/config'
|
||||||
let unitsFilter = {}
|
let unitsFilter = {}
|
||||||
store.state.contract.units.map((x) => {
|
store.state.contract.units.map((x) => {
|
||||||
unitsFilter[x.id] = x.value
|
unitsFilter[x.id] = x.value
|
||||||
})
|
})
|
||||||
let contractTypes = store.state.contract.contractTypes
|
let contractTypes = store.state.contract.contractTypes
|
||||||
|
|
||||||
const tbl = new XTbl('http://hr.asco-intl.com:2020/kernel/api/personnel/contract/table', 'لیست قرارداد ها');
|
const tbl = new XTbl(`${API_BASE_URL}/personnel/contract/table`, 'لیست قرارداد ها');
|
||||||
tbl.add(new Xtc('personnel.proposal.name', 'نام پرسنل').filterText())
|
tbl.add(new Xtc('personnel.proposal.name', 'نام پرسنل').filterText())
|
||||||
tbl.add(new Xtc('personnel.proposal.ncode', 'کد ملی').filterText())
|
tbl.add(new Xtc('personnel.proposal.ncode', 'کد ملی').filterText())
|
||||||
tbl.add(new Xtc('personnel_id', 'کد پرسنلی').filterText())
|
tbl.add(new Xtc('personnel_id', 'کد پرسنلی').filterText())
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="!$getAccess('personnel.basic.update')"
|
:disabled="!$getAccess('personnel.basic.update')"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="documentFileList"
|
:file-list="documentFileList"
|
||||||
:default-file-list="documentFileList"
|
:default-file-list="documentFileList"
|
||||||
@change="changeDocumentUpload"
|
@change="changeDocumentUpload"
|
||||||
@@ -490,7 +490,7 @@
|
|||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="!$getAccess('personnel.basic.update')"
|
:disabled="!$getAccess('personnel.basic.update')"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="prsonalFileList"
|
:file-list="prsonalFileList"
|
||||||
:default-file-list="prsonalFileList"
|
:default-file-list="prsonalFileList"
|
||||||
@change="fileUpload"
|
@change="fileUpload"
|
||||||
@@ -622,7 +622,7 @@
|
|||||||
<a-button type="danger" class="mt-3 mr-3">حذف</a-button>
|
<a-button type="danger" class="mt-3 mr-3">حذف</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<!– <a-button :disabled="!$getAccess('personnel.contract.print')" class="ml-3" :href="`http://hr.asco-intl.com:2020/kernel/api/personnel/print?id=${item.id}&type=${item.type?item.type:1}`" target="_blank">چاپ قرداد</a-button>–>
|
<!– <a-button :disabled="!$getAccess('personnel.contract.print')" class="ml-3" :href="`${$apiBase}/personnel/print?id=${item.id}&type=${item.type?item.type:1}`" target="_blank">چاپ قرداد</a-button>–>
|
||||||
<a-dropdown class="mb-4">
|
<a-dropdown class="mb-4">
|
||||||
<a-menu slot="overlay" @click="printContract($event,item.id)">
|
<a-menu slot="overlay" @click="printContract($event,item.id)">
|
||||||
<a-menu-item v-for="(subItem,subIndex) in contractTypes" :key="subIndex">{{ subItem }}
|
<a-menu-item v-for="(subItem,subIndex) in contractTypes" :key="subIndex">{{ subItem }}
|
||||||
@@ -1090,7 +1090,7 @@
|
|||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="!$getAccess('personnel.basic.update')"
|
:disabled="!$getAccess('personnel.basic.update')"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="contractFileList"
|
:file-list="contractFileList"
|
||||||
:default-file-list="contractFileList"
|
:default-file-list="contractFileList"
|
||||||
@change="contractFileUpload"
|
@change="contractFileUpload"
|
||||||
@@ -1501,7 +1501,7 @@ export default {
|
|||||||
this.flags.gender = event.target.value
|
this.flags.gender = event.target.value
|
||||||
},
|
},
|
||||||
printContract(event, id) {
|
printContract(event, id) {
|
||||||
window.open(`http://hr.asco-intl.com:2020/kernel/api/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
|
window.open(`${this.$apiBase}/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
|
||||||
},
|
},
|
||||||
contractFileUpload({fileList, event, file}) {
|
contractFileUpload({fileList, event, file}) {
|
||||||
if (file.response && file.response.id) {
|
if (file.response && file.response.id) {
|
||||||
|
|||||||
@@ -260,7 +260,7 @@
|
|||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="!$getAccess('personnel.basic.update')"
|
:disabled="!$getAccess('personnel.basic.update')"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="contractFileList"
|
:file-list="contractFileList"
|
||||||
:default-file-list="contractFileList"
|
:default-file-list="contractFileList"
|
||||||
@change="contractFileUpload"
|
@change="contractFileUpload"
|
||||||
@@ -426,7 +426,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
printContract(event, id) {
|
printContract(event, id) {
|
||||||
window.open(`http://hr.asco-intl.com:2020/kernel/api/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
|
window.open(`${this.$apiBase}/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
|
||||||
},
|
},
|
||||||
openEditingContractModal(item, index) {
|
openEditingContractModal(item, index) {
|
||||||
// console.log(this.contractTypes)
|
// console.log(this.contractTypes)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
||||||
|
import { API_BASE_URL } from '@/config'
|
||||||
|
|
||||||
const tbl = new XTbl('http://hr.asco-intl.com:2020/kernel/api/personnel/table', 'لیست پرسنل');
|
const tbl = new XTbl(`${API_BASE_URL}/personnel/table`, 'لیست پرسنل');
|
||||||
tbl.add(new Xtc('id', 'کد پرسنلی').filterText())
|
tbl.add(new Xtc('id', 'کد پرسنلی').filterText())
|
||||||
tbl.add(new Xtc('name', 'نام و نام خانوادگی').filterText());
|
tbl.add(new Xtc('name', 'نام و نام خانوادگی').filterText());
|
||||||
tbl.add(new Xtc('insurance_no', 'شماره بیمه').filterText())
|
tbl.add(new Xtc('insurance_no', 'شماره بیمه').filterText())
|
||||||
|
|||||||
@@ -269,7 +269,7 @@
|
|||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="!$getAccess('personnel.basic.update')"
|
:disabled="!$getAccess('personnel.basic.update')"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="documentFileList"
|
:file-list="documentFileList"
|
||||||
:default-file-list="documentFileList"
|
:default-file-list="documentFileList"
|
||||||
@change="changeDocumentUpload"
|
@change="changeDocumentUpload"
|
||||||
@@ -619,7 +619,7 @@
|
|||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="prsonalFileList"
|
:file-list="prsonalFileList"
|
||||||
:default-file-list="prsonalFileList"
|
:default-file-list="prsonalFileList"
|
||||||
@change="fileUpload"
|
@change="fileUpload"
|
||||||
@@ -1243,7 +1243,7 @@
|
|||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="!$getAccess('personnel.basic.update')"
|
:disabled="!$getAccess('personnel.basic.update')"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="contractFileList"
|
:file-list="contractFileList"
|
||||||
:default-file-list="contractFileList"
|
:default-file-list="contractFileList"
|
||||||
@change="contractFileUpload"
|
@change="contractFileUpload"
|
||||||
@@ -1881,7 +1881,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},*/
|
},*/
|
||||||
/* printContract(event, id) {
|
/* printContract(event, id) {
|
||||||
window.open(`http://hr.asco-intl.com:2020/kernel/api/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
|
window.open(`${this.$apiBase}/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
|
||||||
},*/
|
},*/
|
||||||
/* contractFileUpload({fileList, event, file}) {
|
/* contractFileUpload({fileList, event, file}) {
|
||||||
if (file.response && file.response.id) {
|
if (file.response && file.response.id) {
|
||||||
|
|||||||
@@ -425,7 +425,7 @@
|
|||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="prsonalFileList"
|
:file-list="prsonalFileList"
|
||||||
:default-file-list="prsonalFileList"
|
:default-file-list="prsonalFileList"
|
||||||
@change="fileUpload"
|
@change="fileUpload"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
||||||
|
import { API_BASE_URL } from '@/config'
|
||||||
|
|
||||||
const tbl = new XTbl('http://hr.asco-intl.com:2020/kernel/api/proposal/table', 'لیست درخواست ها');
|
const tbl = new XTbl(`${API_BASE_URL}/proposal/table`, 'لیست درخواست ها');
|
||||||
tbl.add(new Xtc('name', 'نام و نام خانوادگی').filterText());
|
tbl.add(new Xtc('name', 'نام و نام خانوادگی').filterText());
|
||||||
tbl.add(new Xtc('ncode', 'کد ملی').filterText())
|
tbl.add(new Xtc('ncode', 'کد ملی').filterText())
|
||||||
tbl.add(new Xtc('mobile', 'موبایل').filterText())
|
tbl.add(new Xtc('mobile', 'موبایل').filterText())
|
||||||
|
|||||||
@@ -525,7 +525,7 @@
|
|||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:default-file-list="fileList"
|
:default-file-list="fileList"
|
||||||
@change="changeDocumentUpload"
|
@change="changeDocumentUpload"
|
||||||
|
|||||||
@@ -532,7 +532,7 @@
|
|||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
:action="$apiBase + '/register/upload'"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:default-file-list="fileList"
|
:default-file-list="fileList"
|
||||||
@change="changeDocumentUpload"
|
@change="changeDocumentUpload"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
import XTbl, {Xtc} from '../../components/new-x-table/index';
|
||||||
|
import { API_BASE_URL } from '@/config'
|
||||||
|
|
||||||
const tbl = new XTbl('http://hr.asco-intl.com:2020/kernel/api/user/table', 'لیست کاربران');
|
const tbl = new XTbl(`${API_BASE_URL}/user/table`, 'لیست کاربران');
|
||||||
tbl.add(new Xtc('id', 'id').filterNumber());
|
tbl.add(new Xtc('id', 'id').filterNumber());
|
||||||
tbl.add(new Xtc('name', 'نام و نام خانوادگی').filterText());
|
tbl.add(new Xtc('name', 'نام و نام خانوادگی').filterText());
|
||||||
tbl.add(new Xtc('user_type.value', 'نوع کاربر').filterText());
|
tbl.add(new Xtc('user_type.value', 'نوع کاربر').filterText());
|
||||||
|
|||||||
Reference in New Issue
Block a user