Commit 5d48f159 by swl

gx

parent b262e3e7
No preview for this file type
import {
api,
formatParams
} from "@/utils/axios";
import {
api1,
formatParams1,
config
} from '@/utils/request'
import { api, formatParams } from "@/utils/axios";
import { api1, formatParams1, config } from "@/utils/request";
// import { baseUrl } from '@/config/index'
/**
* 查询列表
*/
export function getList(params) {
return api(Object.assign(formatParams('POST', params), {
url: `${config.proxy}/admin-api/familyCode/queryList`
}))
return api(
Object.assign(formatParams("POST", params), {
url: `${config.proxy}/admin-api/familyCode/queryList`,
})
);
}
/**
* 查询详情
*/
export function get(params) {
return api(Object.assign(formatParams('GET', params), {
url: `${config.proxy}/admin-api/familyCode/detail`
}))
return api(
Object.assign(formatParams("GET", params), {
url: `${config.proxy}/admin-api/familyCode/detail`,
})
);
}
/**
* 查询类型
*/
export function getType() {
return api(Object.assign(formatParams('POST',), {
url: `${config.proxy}/admin-api/familyCode/queryZjCity`
}))
return api(
Object.assign(formatParams("POST"), {
url: `${config.proxy}/admin-api/familyCode/queryZjCity`,
})
);
}
/**
* 查询状态
*/
export function getReviewState(params) {
return api(Object.assign(formatParams('GET'), {
url: `${config.proxy}/admin-api/familyCode/reviewState?type=${params}`
}))
return api(
Object.assign(formatParams("GET"), {
url: `${config.proxy}/admin-api/familyCode/reviewState?type=${params}`,
})
);
}
// 审核
export function familyAudit(params) {
return api(Object.assign(formatParams('POST',params), {
url: `${config.proxy}/admin-api/familyCode/review`
}))
return api(
Object.assign(formatParams("POST", params), {
url: `${config.proxy}/admin-api/familyCode/review`,
})
);
}
/**
* 修改状态
*/
export function updateState(params) {
return api1(Object.assign(formatParams1('POST', params), {
url: `${config.proxy}talent/updateState`
}))
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/updateState`,
})
);
}
/**
* 审核改派
*/
export function auditUpdate(params) {
return api(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}/admin-api/familyCode/reassignment`,
})
);
}
/**
* 操作记录
*/
export function getRecord(params) {
return api(Object.assign(formatParams('GET', params), {
url: `${config.proxy}/admin-api/familyCode/queryRecordList`
}))
return api(
Object.assign(formatParams("GET", params), {
url: `${config.proxy}/admin-api/familyCode/queryRecordList`,
})
);
}
/**
* 查询责任部门
*/
export function getBranch(params) {
return api1(Object.assign(formatParams1('GET', params), {
url: `${config.proxy}talent/getBranch?appId=1234`
}))
return api1(
Object.assign(formatParams1("GET", params), {
url: `${config.proxy}talent/getBranch?appId=1234`,
})
);
}
/**
* 修改学历状态
*/
export function educationState(params) {
return api1(Object.assign(formatParams1('POST', params), {
url: `${config.proxy}talent/educationState`
}))
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/educationState`,
})
);
}
/**
* 查看学历
*/
export function educationQuery(params) {
return api1(Object.assign(formatParams1('POST', params), {
url: `${config.proxy}talent/getEducation`
}))
return api1(
Object.assign(formatParams1("POST", params), {
url: `${config.proxy}talent/getEducation`,
})
);
}
......@@ -4,8 +4,8 @@ import { getToken } from "@/utils/auth";
const config = {
// proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址
proxy: "http://81.69.231.72:8881/", // 测试地址
// proxy: "http://192.168.3.87:8881/", //本地
// proxy: "http://81.69.231.72:8881/", // 测试地址
proxy: "http://192.168.3.87:8881/", //本地
// proxy: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口
};
......
......@@ -91,21 +91,25 @@
>查看</el-button
>
<el-button
type="primary"
size="mini"
plain
round
@click="update(scope.row)"
v-if="$route.query.areaCode && $route.query.areaCode == '321199'"
>改派</el-button
>
<el-button
type="warning"
size="mini"
round
@click="getRecord(scope.row)"
v-if="
!this.$route.query.areaCode &&
this.$route.query.areaCode == '321199'
"
v-if="$route.query.areaCode != '321199'"
>记录</el-button
>
<el-button
v-if="
scope.row.stateCode == '0' &&
!this.$route.query.areaCode &&
this.$route.query.areaCode == '321199'
scope.row.stateCode == '0' && $route.query.areaCode != '321199'
"
type="success"
size="mini"
......@@ -118,9 +122,7 @@
size="mini"
round
v-if="
scope.row.stateCode == '0' &&
!this.$route.query.areaCode &&
this.$route.query.areaCode == '321199'
scope.row.stateCode == '0' && $route.query.areaCode != '321199'
"
@click="auditHandle(scope.row, '1')"
>拒绝</el-button
......@@ -566,6 +568,35 @@
<p v-else>暂无记录~</p>
</div>
</el-dialog>
<el-dialog title="改派" :visible.sync="dialogVisible" width="30%">
<el-form
:model="areaForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
>
<el-form-item label="改派市区" prop="areaCode">
<el-select
v-model="areaForm.code"
clearable
placeholder="请选择改派市区"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="areaConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -579,6 +610,7 @@ import {
getType,
getReviewState,
familyAudit,
auditUpdate,
} from "@/api/talents";
// import { Message } from "element-ui";
......@@ -685,6 +717,18 @@ export default {
// 查看对话框当前row
viewRow: {},
flag: 0,
dialogVisible: false,
areaForm: {
code: "",
},
familyCode: "",
rules: {
areaCode: {
required: true,
message: "请选择改派市区",
trigger: "blur",
},
},
passOptions: [], //审核通过的状态
auditRules: {
stateCode: {
......@@ -707,7 +751,6 @@ export default {
this.areaCode = this.$route.query.areaCode
? this.$route.query.areaCode
: "";
console.log(this.areaCode, "11345");
this.code = this.$route.query.code ? this.$route.query.code : "";
this.searchForm.name = "";
this.searchForm.phone = "";
......@@ -723,9 +766,6 @@ export default {
};
this.init();
this.initType();
// if (!this.branchCode) {
// this.initBranch();
// }
}
},
},
......@@ -769,7 +809,26 @@ export default {
});
});
},
update(row) {
this.dialogVisible = true;
this.familyCode = row.familyCode;
console.log(row);
},
areaConfirm() {
let params = {
areaCode: this.areaForm.code,
familyCode: this.familyCode,
};
auditUpdate(params).then((res) => {
if (res.code == 200) {
console.log(res.data);
this.$message.success(res.data || "派发成功");
this.dialogVisible = false;
this.searchForm.areaCode = this.$route.query.areaCode;
this.init();
}
});
},
initReviewState() {
getReviewState(0).then((res) => {
this.reviewStateOptions = res.data.map((item) => {
......@@ -880,6 +939,8 @@ export default {
if (res.code == 200) {
this.$message.success(res.msg || "审核成功");
this.auditDialog = false;
this.searchForm.areaCode = this.$route.query.areaCode;
this.init();
} else {
this.$message.success(res.msg || "审核失败");
......@@ -899,6 +960,8 @@ export default {
this.$message.success(res.msg || "审核成功");
this.auditDialog = false;
this.searchForm.areaCode = this.$route.query.areaCode;
this.init();
} else {
this.$message.success(res.msg || "审核失败");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment