flat: 全职和零工的的岗位页面,选择企业名称改为手动输入

This commit is contained in:
史典卓
2025-06-23 15:48:10 +08:00
parent 1b8eb2291d
commit ec51dfbb3a
9 changed files with 151 additions and 127 deletions

View File

@@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.12.0/theme-chalk/index.css">

View File

@@ -28,7 +28,7 @@ import i18n from './lang' // Internationalization
import axios from './router/axios';
import router from './router/router';
import store from './store';
import {loadStyle} from './util/util';
import {loadStyle, staticPath} from './util/util';
import event from './event';
Vue.use(router);
@@ -60,6 +60,7 @@ function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time))
}
Vue.prototype.staticPath = staticPath
Vue.prototype.$api = {sleep}
Vue.config.productionTip = false;

View File

@@ -6,7 +6,7 @@
<transition-group name="fade">
<template v-if="!keyCollapse">
<span class="avue-logo_title" style=" display: flex !important; align-items: center !important;" key="1">
<img height="42px" width="200px" src="/svg/logo_dark2.png" alt/>
<img height="42px" width="200px" :src="staticPath('logo_dark2.png', 'svg')" alt/>
</span>
</template>
</transition-group>
@@ -16,6 +16,7 @@
<script>
import {mapGetters, mapState} from "vuex";
console.log(process.env.BASE_URL)
export default {
name: "logo",
data() {

View File

@@ -44,6 +44,10 @@ axios.interceptors.request.use(config => {
if (config.method === 'post' && meta.isSerialize === true) {
config.data = serialize(config.data);
}
// 馆陶替换url
if (config.url.startsWith('/api')) {
config.url = config.url.replace(/^\/api/, '/api/gt');
}
return config
}, error => {
return Promise.reject(error)

View File

@@ -18,7 +18,7 @@ Vue.use(VueRouter);
export const createRouter = () =>
new VueRouter({
mode: 'history',
base: '/gt/manage/',
base: '/hl/manage/',
// https://router.vquejs.org/zh/guide/advanced/scroll-behavior.html#%E5%BC%82%E6%AD%A5%E6%BB%9A%E5%8A%A8
// 这个方法 是控制滚动条
// 如果 retuen falsy || {} ,则不发生滚动

View File

@@ -5,7 +5,9 @@ import {validatenull} from './validate'
//表单序列化
export const serialize = data => {
let list = [];
Object.keys(data).forEach(ele => {list.push(`${ele}=${data[ele]}`)})
Object.keys(data).forEach(ele => {
list.push(`${ele}=${data[ele]}`)
})
return list.join('&');
};
export const getObjType = obj => {
@@ -28,10 +30,10 @@ export const getObjType = obj => {
return map[toString.call(obj)];
};
export const getViewDom =
() => {
return window.document.getElementById('avue-view')
.getElementsByClassName('el-scrollbar__wrap')[0]
}
() => {
return window.document.getElementById('avue-view')
.getElementsByClassName('el-scrollbar__wrap')[0]
}
/**
* 对象深拷贝
*/
@@ -71,9 +73,9 @@ export const toggleGrayMode = (status) => {
* 设置主题
*/
export const setTheme =
(name) => {
document.body.className = name;
}
(name) => {
document.body.className = name;
}
/**
* 加密处理
@@ -111,16 +113,17 @@ export const listenfullscreen = (callback) => {
function listen() {
callback()
}
document.addEventListener('fullscreenchange', function() {
document.addEventListener('fullscreenchange', function () {
listen();
});
document.addEventListener('mozfullscreenchange', function() {
document.addEventListener('mozfullscreenchange', function () {
listen();
});
document.addEventListener('webkitfullscreenchange', function() {
document.addEventListener('webkitfullscreenchange', function () {
listen();
});
document.addEventListener('msfullscreenchange', function() {
document.addEventListener('msfullscreenchange', function () {
listen();
});
};
@@ -128,11 +131,11 @@ export const listenfullscreen = (callback) => {
* 浏览器判断是否全屏
*/
export const fullscreenEnable =
() => {
var isFullscreen = document.isFullScreen || document.mozIsFullScreen ||
document.webkitIsFullScreen
return isFullscreen;
}
() => {
var isFullscreen = document.isFullScreen || document.mozIsFullScreen ||
document.webkitIsFullScreen
return isFullscreen;
}
/**
* 浏览器全屏
@@ -197,32 +200,32 @@ export const loadStyle = url => {
* 判断路由是否相等
*/
export const diff =
(obj1, obj2) => {
delete obj1.close;
var o1 = obj1 instanceof Object;
var o2 = obj2 instanceof Object;
if (!o1 || !o2) { /* 判断不是对象 */
return obj1 === obj2;
}
if (Object.keys(obj1).length !== Object.keys(obj2).length) {
return false;
// Object.keys()
// 返回一个由对象的自身可枚举属性(key值)组成的数组,例如数组返回下表let
// arr = ["a", "b", "c"];console.log(Object.keys(arr))->0,1,2;
}
for (var attr in obj1) {
var t1 = obj1[attr] instanceof Object;
var t2 = obj2[attr] instanceof Object;
if (t1 && t2) {
return diff(obj1[attr], obj2[attr]);
} else if (obj1[attr] !== obj2[attr]) {
return false;
}
}
return true;
(obj1, obj2) => {
delete obj1.close;
var o1 = obj1 instanceof Object;
var o2 = obj2 instanceof Object;
if (!o1 || !o2) { /* 判断不是对象 */
return obj1 === obj2;
}
if (Object.keys(obj1).length !== Object.keys(obj2).length) {
return false;
// Object.keys()
// 返回一个由对象的自身可枚举属性(key值)组成的数组,例如数组返回下表let
// arr = ["a", "b", "c"];console.log(Object.keys(arr))->0,1,2;
}
for (var attr in obj1) {
var t1 = obj1[attr] instanceof Object;
var t2 = obj2[attr] instanceof Object;
if (t1 && t2) {
return diff(obj1[attr], obj2[attr]);
} else if (obj1[attr] !== obj2[attr]) {
return false;
}
}
return true;
}
/**
* 根据字典的value显示label
*/
@@ -230,7 +233,7 @@ export const findByvalue = (dic, value) => {
let result = '';
if (validatenull(dic)) return value;
if (typeof (value) == 'string' || typeof (value) == 'number' ||
typeof (value) == 'boolean') {
typeof (value) == 'boolean') {
let index = 0;
index = findArray(dic, value);
if (index != -1) {
@@ -270,8 +273,8 @@ export const findArray = (dic, value) => {
export const randomLenNum = (len, date) => {
let random = '';
random = Math.ceil(Math.random() * 100000000000000)
.toString()
.substr(0, len ? len : 4);
.toString()
.substr(0, len ? len : 4);
if (date) random = random + Date.now();
return random;
};
@@ -279,95 +282,97 @@ export const randomLenNum = (len, date) => {
* 打开小窗口
*/
export const openWindow =
(url, title, w, h) => {
// Fixes dual-screen position Most browsers
// Firefox
const dualScreenLeft =
window.screenLeft !== undefined ? window.screenLeft : screen.left
const dualScreenTop =
window.screenTop !== undefined ? window.screenTop : screen.top
(url, title, w, h) => {
// Fixes dual-screen position Most browsers
// Firefox
const dualScreenLeft =
window.screenLeft !== undefined ? window.screenLeft : screen.left
const dualScreenTop =
window.screenTop !== undefined ? window.screenTop : screen.top
const width = window.innerWidth ? window.innerWidth :
document.documentElement.clientWidth ?
document.documentElement.clientWidth :
screen.width
const height = window.innerHeight ?
window.innerHeight :
document.documentElement.clientHeight ?
document.documentElement.clientHeight :
screen.height
const width = window.innerWidth ? window.innerWidth :
document.documentElement.clientWidth ?
document.documentElement.clientWidth :
screen.width
const height = window.innerHeight ?
window.innerHeight :
document.documentElement.clientHeight ?
document.documentElement.clientHeight :
screen.height
const left = ((width / 2) - (w / 2)) + dualScreenLeft
const top = ((height / 2) - (h / 2)) + dualScreenTop
const newWindow = window.open(
url, title,
'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' +
w + ', height=' + h + ', top=' + top + ', left=' + left)
const left = ((width / 2) - (w / 2)) + dualScreenLeft
const top = ((height / 2) - (h / 2)) + dualScreenTop
const newWindow = window.open(
url, title,
'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' +
w + ', height=' + h + ', top=' + top + ', left=' + left)
// Puts focus on the newWindow
if (window.focus) {
newWindow.focus()
}
// Puts focus on the newWindow
if (window.focus) {
newWindow.focus()
}
}
/**
* 导出excel
*/
export const exportFunc =
(title, data, fileName) => {
const aoa = [title]
data.forEach(item => {aoa.push(item)})
const sheet = XLSX.utils.aoa_to_sheet(aoa)
const book = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(book, sheet, 'sheet1')
XLSX.writeFile(book, fileName)
}
(title, data, fileName) => {
const aoa = [title]
data.forEach(item => {
aoa.push(item)
})
const sheet = XLSX.utils.aoa_to_sheet(aoa)
const book = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(book, sheet, 'sheet1')
XLSX.writeFile(book, fileName)
}
/**
* 下载文件
*/
export const download =
(fileName, data) => {
if (!data) {
return;
}
let url = window.URL.createObjectURL(new Blob([data]));
let link = document.createElement('a');
link.style.display = 'none';
link.href = url;
link.setAttribute('download', fileName);
document.body.appendChild(link);
link.click();
(fileName, data) => {
if (!data) {
return;
}
let url = window.URL.createObjectURL(new Blob([data]));
let link = document.createElement('a');
link.style.display = 'none';
link.href = url;
link.setAttribute('download', fileName);
document.body.appendChild(link);
link.click();
}
/**
* 数据分页
*/
export const pagination =
(arr, currentPage, pageSize) => {
const res = [];
const start = (currentPage - 1) * pageSize;
const end = start + pageSize;
for (let index = start; index < end && index < arr.length; index++) {
res.push(arr[index]);
}
return res;
(arr, currentPage, pageSize) => {
const res = [];
const start = (currentPage - 1) * pageSize;
const end = start + pageSize;
for (let index = start; index < end && index < arr.length; index++) {
res.push(arr[index]);
}
return res;
}
/**
* 通过身份证获取年龄
*/
export const getAgeByIdNumber =
(idNumber) => {
const year = idNumber.substring(6, 10)
const month = idNumber.substring(10, 12)
const day = idNumber.substring(12, 14)
const now = new Date()
let age = now.getFullYear() - year
if (now.getMonth() < month ||
(now.getMonth() == month && day < now.getDay())) {
age--;
}
return age
(idNumber) => {
const year = idNumber.substring(6, 10)
const month = idNumber.substring(10, 12)
const day = idNumber.substring(12, 14)
const now = new Date()
let age = now.getFullYear() - year
if (now.getMonth() < month ||
(now.getMonth() == month && day < now.getDay())) {
age--;
}
return age
}
/**
* 通过身份证获取性别
*/
@@ -393,17 +398,24 @@ export const idNumberDDesensitization = (idNumber) => {
export const nameDesensitization = (name) => {
if (!name) return '';
let str = name;
str = str.substring(0,1) + new Array(str.length).join('*')
str = str.substring(0, 1) + new Array(str.length).join('*')
return str;
}
export function debounce(fn, delay) {
let timer = null
return function() {
return function () {
const context = this
const args = arguments
clearTimeout(timer)
timer = setTimeout(function() {
timer = setTimeout(function () {
fn.apply(context, args)
}, delay)
}
}
export function staticPath(path = '', folder = '') {
const base = process.env.BASE_URL || '/';
const prefix = folder ? `${folder}/` : '';
return `${base}${prefix}${path}`.replace(/\/\/+/g, '/');
}

View File

@@ -636,13 +636,13 @@ export default {
trigger: "blur",
},
],
formslot: true,
// formslot: true,
span: 12,
},
{
label: "单位信用代码",
prop: "missionCompanyScale",
disabled: true,
// disabled: true,
// rules: [
// {
// required: true,
@@ -655,7 +655,7 @@ export default {
{
label: "所属行业",
prop: "missionCompanyIndustry",
disabled: true,
// disabled: true,
// rules: [
// {
// required: true,
@@ -674,7 +674,7 @@ export default {
{
label: "单位性质",
prop: "missionCompanyNature",
disabled: true,
// disabled: true,
type: 'select',
dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature",
props: {

View File

@@ -763,13 +763,13 @@ export default {
trigger: "blur",
},
],
formslot: true,
// formslot: true,
span: 12,
},
{
label: "单位信用代码",
prop: "jobCompanyScale",
disabled: true,
// disabled: true,
// rules: [
// {
// required: true,
@@ -782,7 +782,7 @@ export default {
{
label: "所属行业",
prop: "jobCompanyIndustry",
disabled: true,
// disabled: true,
// rules: [
// {
// required: true,
@@ -790,13 +790,19 @@ export default {
// trigger: "blur",
// },
// ],
type: "select",
dicData: this.tradeData,
props: {
label: "name",
value: "name",
},
span: 12,
},
{
prop: "jobCompanyNature",
label: "单位性质",
type: 'select',
disabled: true,
// disabled: true,
dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature",
props: {
label: "dictValue",

View File

@@ -1,6 +1,6 @@
module.exports = {
//路径前缀
publicPath: '/gt/manage/',
publicPath: '/hl/manage/',
outputDir: "manage",
lintOnSave: true,
productionSourceMap: false,