Commit 404b8207 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'master' of http://git.mes123.com/zhouyx/mes-ui

parents 3807f686 d7a69957
......@@ -39,11 +39,11 @@
}
}
.ivu-card-head{
background: #62b8af!important;
background: #2d8cf0!important;
}
}
.g_title{
color: #249e91;
color: #2d8cf0;
}
}
.dispatch_card02{
......@@ -86,9 +86,9 @@
.drawer_center{
text-align: center;
padding: 10px;
color: #249e91;
color: #2d8cf0;
.color{
color: #2680EB;
color: #2d8cf0;
}
}
}
......@@ -106,9 +106,9 @@
.drawer_center{
text-align: center;
padding: 10px;
color: #249e91;
color: #2d8cf0;
.color{
color: #2680EB;
color: #2d8cf0;
}
}
}
......
......@@ -73,7 +73,7 @@
<Icon
type="ios-disc"
size="18"
:color="item.id==shebeiId?'#249e91':'#fff'"
:color="item.id==shebeiId?'#2d8cf0':'#fff'"
/>
<input
name="shebei"
......
......@@ -23,6 +23,7 @@
:conditions="easySearch"
placeholder="请输入姓名或者员工编号进行搜索"
:high="true"
:height="tdHeight"
>
<template slot="searchForm">
<Search />
......@@ -119,14 +120,14 @@
</Layout>
</template>
<script>
import Api from './api'
import Add from './add'
import Edit from './edit'
import Detail from './detail'
import Search from './search'
import service from '@/plugins/request'
import Api from "./api";
import Add from "./add";
import Edit from "./edit";
import Detail from "./detail";
import Search from "./search";
import service from "@/plugins/request";
export default {
name: 'list',
name: "list",
components: {
Add,
Edit,
......@@ -139,16 +140,17 @@ export default {
easySearch: {
keys: {
op:
'userName,cardNo,national,phone,email,enableEquip,jobNo,remark,departmentTitle,roleTitles',
"userName,cardNo,national,phone,email,enableEquip,jobNo,remark,departmentTitle,roleTitles",
value: null,
default: true
},
departmentId: { op: 'In', value: '' }
departmentId: { op: "In", value: "" }
},
treeData: [],
treeInputSearch: '',
treeHeight: '',
tableHeight: '',
tdHeight: "",
treeInputSearch: "",
treeHeight: "",
tableHeight: "",
show7: false, //重置密码
show3: false, //授权角色
authList: [],
......@@ -168,24 +170,24 @@ export default {
// width: 80,
// align: 'center'
// },
{ key: 'id', title: this.l('id'), hide: true, align: 'left' },
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: 'userName',
title: this.l('userName'),
align: 'left',
key: "userName",
title: this.l("userName"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs: { oprate: 'detail' },
attrs: { oprate: "detail" },
on: { click: () => this.detail(params.row.id) }
},
params.row.userName
)
])
]);
}
},
// {
......@@ -196,106 +198,106 @@ export default {
// hide: true
// },
{
key: 'cardNo',
title: this.l('cardNo'),
align: 'left',
key: "cardNo",
title: this.l("cardNo"),
align: "left",
easy: true,
high: true
},
{
key: 'gender',
title: this.l('gender'),
align: 'center',
key: "gender",
title: this.l("gender"),
align: "center",
high: true,
code: 'User.base.gender'
code: "User.base.gender"
},
{
key: 'birthday',
title: this.l('birthday'),
align: 'center',
key: "birthday",
title: this.l("birthday"),
align: "center",
high: true,
hide: true,
type: 'date'
type: "date"
},
{
key: 'degreeId',
title: this.l('degreeId'),
align: 'left',
key: "degreeId",
title: this.l("degreeId"),
align: "left",
high: true,
code: 'User.base.degree',
code: "User.base.degree",
hide: true
},
{
key: 'status',
title: this.l('status'),
align: 'center',
key: "status",
title: this.l("status"),
align: "center",
high: true,
code: 'User.base.status'
code: "User.base.status"
},
{
key: 'departmentTitle',
title: this.l('departmentTitle'),
align: 'left',
key: "departmentTitle",
title: this.l("departmentTitle"),
align: "left",
easy: true,
high: true
},
{
key: 'roleTitles',
title: this.l('roleTitles'),
align: 'left',
key: "roleTitles",
title: this.l("roleTitles"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs: {
oprate: 'detail',
oprate: "detail",
class:
params.row.roleTitles == null ||
params.row.roleTitles == ''
? 'empower'
: 'detail'
params.row.roleTitles == ""
? "empower"
: "detail"
},
on: { click: () => this.authorize(params.row.id) }
},
params.row.roleTitles == null || params.row.roleTitles == ''
? '授权'
params.row.roleTitles == null || params.row.roleTitles == ""
? "授权"
: params.row.roleTitles
)
])
]);
}
},
{
key: 'creatorUserId',
title: this.l('creatorUserId'),
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: 'left'
align: "left"
},
{
key: 'creationTime',
title: this.l('creationTime'),
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: 'left'
align: "left"
},
{
key: 'lastModifierUserId',
title: this.l('lastModifierUserId'),
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: 'left'
align: "left"
},
{
key: 'lastModificationTime',
title: this.l('lastModificationTime'),
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: 'left'
align: "left"
},
{
key: 'accountId',
title: this.l('accountId'),
key: "accountId",
title: this.l("accountId"),
hide: true,
align: 'left'
align: "left"
},
// {
// key: 'userType',
......@@ -304,137 +306,146 @@ export default {
// align: 'left'
// },
{
key: 'phone',
title: this.l('phone'),
align: 'left',
key: "phone",
title: this.l("phone"),
align: "left",
easy: true,
high: true
},
{
key: 'email',
title: this.l('email'),
align: 'left',
key: "email",
title: this.l("email"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: 'licensedToWork',
title: this.l('licensedToWork'),
align: 'left',
key: "licensedToWork",
title: this.l("licensedToWork"),
align: "left",
hide: true
},
{
key: 'positionId',
title: this.l('positionId'),
align: 'left',
key: "positionId",
title: this.l("positionId"),
align: "left",
high: true,
code: 'User.base.position',
code: "User.base.position",
hide: true
},
{
key: 'titleId',
title: this.l('titleId'),
align: 'left',
key: "titleId",
title: this.l("titleId"),
align: "left",
high: true,
code: 'User.base.jobtitle',
code: "User.base.jobtitle",
hide: true
},
{
title: '操作',
key: 'action',
title: "操作",
key: "action",
width: 180,
align: 'right',
align: "right",
render: (h, params) => {
return h('div', { class: 'action' }, [
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs: {
oprate: 'detail',
class: 'empower'
oprate: "detail",
class: "empower"
},
on: { click: () => this.syncAccount(params.row) }
},
params.row.accountId == 0 ? '同步' : ''
params.row.accountId == 0 ? "同步" : ""
),
h(
'op',
"op",
{
attrs: { oprate: 'edit' },
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
},
'编辑'
"编辑"
),
h(
'op',
"op",
{
attrs: { oprate: 'remove' },
attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row) }
},
'删除'
"删除"
),
h(
'op',
"op",
{
attrs: {
oprate: 'detail'
oprate: "detail"
},
on: { click: () => this.openReset(params.row) }
},
'重置密码'
"重置密码"
)
])
]);
}
}
],
selectRow: {} //删除时选中的行数据
}
};
},
created() {
this.treeHeight = window.innerHeight - 100
this.treeHeight = window.innerHeight - 150
this.tdHeight = window.innerHeight - 240
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.treeHeight = window.screenHeight - 150
this.tdHeight = window.screenHeight - 240
})();
}
this.initTree()
this.loadrole(0)
this.loadrole(1)
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
addOk() {
this.$refs.grid.load()
this.$refs.grid.load();
// this.$refs.grid.reload(this.easySearch)
this.addModal = false
this.detailModal = false
this.editModal = false
this.curId = 0
this.addModal = false;
this.detailModal = false;
this.editModal = false;
this.curId = 0;
//this.$refs.grid.easySearch()
},
search() {
this.$refs.grid.reload(this.easySearch)
this.$refs.grid.reload(this.easySearch);
},
detail(id) {
this.detailModal = true
this.curId = id
this.detailModal = true;
this.curId = id;
},
edit(id) {
this.editModal = true
this.curId = id
this.editModal = true;
this.curId = id;
},
remove(row) {
this.deletelModal = true
this.curId = row.id
this.selectRow = row
this.deletelModal = true;
this.curId = row.id;
this.selectRow = row;
},
removeOk() {
Api.delete({ id: this.curId }).then((r) => {
Api.delete({ id: this.curId }).then(r => {
if (r.success) {
this.$refs.grid.load()
this.deletelModal = false
this.$refs.grid.load();
this.deletelModal = false;
if (this.selectRow.accountId > 0) {
//删除成功后更新auth start
let parms = {
......@@ -442,153 +453,151 @@ export default {
accountId: this.selectRow.accountId,
tanantCode: this.$store.state.userInfo.tanantCode,
isDeleted: true
}
Api.authAccount(parms).then((res) => {
};
Api.authAccount(parms).then(res => {
if (res.success) {
this.$Message.success('账户同步成功')
this.$Message.success("账户同步成功");
}
})
});
}
//删除成功后更新auth end
this.$Message.success('删除成功')
this.$Message.success("删除成功");
}
})
});
},
removeCancel() {
this.deletelModal = false
this.deletelModal = false;
},
cancel() {
this.curId = 0
this.addModal = false
this.detailModal = false
this.editModal = false
this.deletedlModal = false
this.syncAccountModal = false
this.curId = 0;
this.addModal = false;
this.detailModal = false;
this.editModal = false;
this.deletedlModal = false;
this.syncAccountModal = false;
},
l(key) {
let vkey = 'user' + '.' + key
return this.$t(vkey) || key
let vkey = "user" + "." + key;
return this.$t(vkey) || key;
},
initTree() {
this.$http.department.getDepartmentTree(this.treeData)
this.$http.department.getDepartmentTree(this.treeData);
},
selectTreeNode1(value) {
if (value != '') {
this.searchObj.departmentId = null
this.searchObj.level_Desc = value[0].value
this.mDatas.splice(0)
this.$http.sysUser.getSearchTable2(this.mDatas, this.searchObj)
if (value != "") {
this.searchObj.departmentId = null;
this.searchObj.level_Desc = value[0].value;
this.mDatas.splice(0);
this.$http.sysUser.getSearchTable2(this.mDatas, this.searchObj);
}
},
selectTreeNode(value) {
if (value.length > 0) {
this.ids = []
this.getAllIds(value)
this.ids = [];
this.getAllIds(value);
if (this.ids.length > 0) {
this.easySearch.departmentId.value = this.ids
this.easySearch.departmentId.value = this.ids;
} else {
this.easySearch.departmentId.value = [-1]
this.easySearch.departmentId.value = [-1];
}
this.$refs.grid.easySearch()
this.$refs.grid.easySearch();
}
},
getAllIds(trees) {
trees.forEach((data, index) => {
var that = this
this.ids.push(data.value)
var that = this;
this.ids.push(data.value);
if (data.children.length > 0) {
this.getAllIds(data.children)
this.getAllIds(data.children);
}
})
});
},
//重置密碼
openReset(row) {
this.show7 = true
this.curId = row.id
this.selectRow = row
this.show7 = true;
this.curId = row.id;
this.selectRow = row;
},
reset() {
let parms = {
userId: this.curId,
accountId: this.selectRow.accountId
}
Api.authResetpassword(parms).then((res) => {
};
Api.authResetpassword(parms).then(res => {
if (res.success) {
this.$Message.success('重置成功!')
this.$Message.success("重置成功!");
} else {
this.$Message.error('重置失败!')
this.$Message.error("重置失败!");
}
})
});
},
//授权角色
loadrole(type) {
var url = `${systemUrl}/MyRole/GetRolesAsync`
var data = []
service
.get(`${url}`, { params: { role_type: type } })
.then((response) => {
data = response.data.result.items
if (type == 1) {
this.authList = data
}
if (type == 0) {
this.authList1 = data
}
})
var url = `${systemUrl}/MyRole/GetRolesAsync`;
var data = [];
service.get(`${url}`, { params: { role_type: type } }).then(response => {
data = response.data.result.items;
if (type == 1) {
this.authList = data;
}
if (type == 0) {
this.authList1 = data;
}
});
},
authorize(id) {
//授权
this.authModel.default = []
this.authModel.extra = []
this.curId = id
this.show3 = true
var url = `${systemUrl}/MyUserRole/GetPaged`
service.get(`${url}`, { params: { userId: id } }).then((response) => {
var data = response.data.result.items
this.authModel.default = [];
this.authModel.extra = [];
this.curId = id;
this.show3 = true;
var url = `${systemUrl}/MyUserRole/GetPaged`;
service.get(`${url}`, { params: { userId: id } }).then(response => {
var data = response.data.result.items;
var dt1 = data.filter(function(ite) {
return ite.role_type == 0
})
return ite.role_type == 0;
});
var dt2 = data.filter(function(ite) {
return ite.role_type == 1
})
return ite.role_type == 1;
});
dt1.forEach((item, i) => {
this.authModel.default.push(item.roleId)
})
this.authModel.default.push(item.roleId);
});
dt2.forEach((item, i) => {
this.authModel.extra.push(item.roleId)
})
})
this.authModel.extra.push(item.roleId);
});
});
},
authOk() {
var url = `${systemUrl}/MyUserRole/CreateOrUpdate`
var url = `${systemUrl}/MyUserRole/CreateOrUpdate`;
service
.post(
`${url}`,
JSON.stringify({
myUserRole: {
userId: this.curId,
RoleIds: this.allChecked.join(',')
RoleIds: this.allChecked.join(",")
}
})
)
.then((response) => {
.then(response => {
if (response.data.success) {
this.$Message.success('保存成功')
this.authModel.extra = []
this.authModel.default = []
this.$refs.grid.easySearch()
this.$Message.success("保存成功");
this.authModel.extra = [];
this.authModel.default = [];
this.$refs.grid.easySearch();
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
},
authCancle() {},
//同步账户start
syncAccount(row) {
this.syncAccountModal = true
this.selectRow = row
this.syncAccountModal = true;
this.selectRow = row;
},
syncAccountOk() {
let parms = {
......@@ -596,57 +605,57 @@ export default {
loginName: this.selectRow.phone,
status: this.selectRow.status,
tanantCode: this.$store.state.userInfo.tanantCode
}
if (this.selectRow.phone&&this.selectRow.phone != '') {
Api.authAccount(parms).then((res) => {
};
if (this.selectRow.phone && this.selectRow.phone != "") {
Api.authAccount(parms).then(res => {
if (res.success) {
this.$Message.success('账户同步成功')
this.$Message.success("账户同步成功");
let parms1 = {
userId: parms.userId,
accountId: res.result
}
Api.updateAccount(parms1).then((res1) => {
};
Api.updateAccount(parms1).then(res1 => {
if (res1.success) {
this.$Message.success('操作成功')
this.$refs.grid.easySearch()
this.$Message.success("操作成功");
this.$refs.grid.easySearch();
} else {
this.$Message.error('同步失败')
this.$Message.error("同步失败");
}
})
});
}
})
});
} else {
this.$Message.error('请完善个人电话信息')
this.$Message.error("请完善个人电话信息");
}
}
//同步账户end
},
computed: {
searchList() {
let nodeList = this.treeData
var text = this.treeInputSearch
var newNodeList = []
let nodeList = this.treeData;
var text = this.treeInputSearch;
var newNodeList = [];
function searchTree(nodeLists, value) {
for (let i = 0; i < nodeLists.length; i++) {
if (nodeLists[i].title.indexOf(value) != -1) {
newNodeList.push(nodeLists[i])
newNodeList.push(nodeLists[i]);
} else if (nodeLists[i].children.length > 0) {
searchTree(nodeLists[i].children, value)
searchTree(nodeLists[i].children, value);
}
}
}
if (text != '') {
searchTree(nodeList, text)
if (text != "") {
searchTree(nodeList, text);
} else {
return nodeList
return nodeList;
}
return newNodeList
return newNodeList;
},
allChecked: function() {
return [...this.authModel.extra, ...this.authModel.default]
return [...this.authModel.extra, ...this.authModel.default];
}
}
}
};
</script>
<style lang="less" scoped>
.full {
......
......@@ -59,14 +59,42 @@
width: 40px;
height: 40px;
border-radius: 50%;
background: #249e91;
// background: #249e91;
float: left;
margin: 12px 10px 0 5px;
.img_bg01 {
display: inline-block;
width: 40px;
height: 40px;
border-radius: 50%;
background: #249e91;
}
.img_bg02 {
display: inline-block;
width: 40px;
height: 40px;
border-radius: 50%;
background: #0099FF;
}
.img_bg03 {
display: inline-block;
width: 40px;
height: 40px;
border-radius: 50%;
background: #FF7A8B;
}
.img_bg04 {
display: inline-block;
width: 40px;
height: 40px;
border-radius: 50%;
background: #FFC300;
}
.Icon_bg {
text-align: center;
padding: 10px 0 0;
img.Icon_icon {
width: 18px;
width: 20px;
}
}
}
......
......@@ -18,8 +18,10 @@
:key="index"
>
<div class="leftIcon">
<div class="Icon_bg">
<img class="Icon_icon" :src="imgUrl + item.image" alt />
<div class="Icon_bg" :class="item.name=='物料复验' ? 'img_bg02':(item.name=='产品合格证' ? 'img_bg03':(item.name=='生产执行' ? 'img_bg04' : 'img_bg01'))" >
<!-- <div > -->
<img class="Icon_icon" src="@/assets/imgicon/u1640.png" alt="">
<!-- <img class="Icon_icon" :src="imgUrl + item.image" alt /> -->
</div>
</div>
<div class="h60">
......
<style>
/* @font-face {
font-family: 'iconfont';
src: url('./iconfont/iconfont.eot');
src: url('./iconfont/iconfont.eot?#iefix') format('embedded-opentype'),
url('./iconfont/iconfont.woff2') format('woff2'),
url('./iconfont/iconfont.woff') format('woff'),
url('./iconfont/iconfont.ttf') format('truetype'),
url('./iconfont/iconfont.svg#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 32px;
font-weight: bold;
/* font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color:#249e91;
} */
.img_bg {
display: inline-block;
width: 48px;
height: 48px;
border-radius: 50%;
background: #249e91;
}
.img_icon {
width: 24px;
margin: 23% 0 0 0;
}
</style>
<template>
<div style="width:100%">
<Card
......@@ -41,9 +11,9 @@
<div class="leftIco">
<!-- color:rgba(36, 158, 145, 1) -->
<!-- <span class="iconfont">&#xe607;</span> -->
<div class="img_bg">
<img class="img_icon" :src="imgUrl + item.image" alt />
<!-- <img class="img_icon" src="@/assets/imgicon/u1650.png" alt=""> -->
<div :class="item.name=='物料复验' ? 'img_bg02':(item.name=='产品合格证' ? 'img_bg03':(item.name=='生产执行' ? 'img_bg04' : 'img_bg01'))" >
<!-- <img class="img_icon" :src="imgUrl + item.image" alt /> -->
<img class="img_icon" src="@/assets/imgicon/u1640.png" alt="">
</div>
<!-- <command icon="@/assets/imgicon/u1638.png"> -->
<!-- <Icon type="md-analytics" size="36" color="#249e91" /> -->
......@@ -82,6 +52,7 @@ export default {
return (data.totalUrl = r.result)
})
})
console.log(list)
this.listTask = list
})
},
......@@ -93,6 +64,38 @@ export default {
}
</script>
<style lang="less" scoped>
.img_bg01 {
display: inline-block;
width: 48px;
height: 48px;
border-radius: 50%;
background: #249e91;
}
.img_bg02 {
display: inline-block;
width: 48px;
height: 48px;
border-radius: 50%;
background: #0099FF;
}
.img_bg03 {
display: inline-block;
width: 48px;
height: 48px;
border-radius: 50%;
background: #FF7A8B;
}
.img_bg04 {
display: inline-block;
width: 48px;
height: 48px;
border-radius: 50%;
background: #FFC300;
}
.img_icon {
width: 24px;
margin: 23% 0 0 0;
}
.waitTask {
cursor: pointer;
margin-bottom: 10px;
......
......@@ -145,7 +145,6 @@ import PhotosensitiveDetails from "./components/photosensitiveDetails.vue"; //
import MetalQuotationGeneration from "./components/metalQuotationGeneration.vue"; //生成报价单弹框
import PhotosensitiveGeneration from "./components/photosensitiveGeneration.vue"; //生成报价单弹框
export default {
components: {
DrawerSet,
......
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