user conflict
This commit is contained in:
commit
1200dda3a9
|
@ -15,11 +15,11 @@
|
|||
|
||||
安装依赖包 `pip install -r requirements.txt`
|
||||
|
||||
修改数据库连接 `server\settings_dev.py`
|
||||
<!-- 修改数据库连接 `server\settings_dev.py`
|
||||
|
||||
同步数据库 `python manage.py migrate`
|
||||
|
||||
创建超级管理员 `python manage.py createsuperuser`
|
||||
创建超级管理员 `python manage.py createsuperuser` -->
|
||||
|
||||
运行服务 `python manage.py runserver 8000`
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export function uploadUrl(){
|
||||
return process.env.VUE_APP_BASE_API + '/upload/'
|
||||
}
|
||||
export function uploadUrl() {
|
||||
return process.env.VUE_APP_BASE_API + '/upload/'
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export function getOrgList(query) {
|
|||
return request({
|
||||
url: '/system/organization/',
|
||||
method: 'get',
|
||||
params:query
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function createOrg(data) {
|
||||
|
@ -32,4 +32,4 @@ export function deleteOrg(id) {
|
|||
url: `/system/organization/${id}/`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function getPositionAll() {
|
||||
return request({
|
||||
url: '/system/position/',
|
||||
|
|
|
@ -15,7 +15,6 @@ export function logout() {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/system/user/info/',
|
||||
|
@ -23,8 +22,6 @@ export function getInfo() {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function getUserList(query) {
|
||||
return request({
|
||||
url: '/system/user/',
|
||||
|
|
|
@ -14,7 +14,6 @@ import router from './router'
|
|||
|
||||
import '@/icons' // icon
|
||||
import '@/permission' // permission control
|
||||
|
||||
/**
|
||||
* If you don't want to use mock-server
|
||||
* you want to use MockJs for mock api
|
||||
|
@ -31,7 +30,7 @@ if (process.env.NODE_ENV === 'production') {
|
|||
// set ElementUI lang to EN
|
||||
// Vue.use(ElementUI, { locale })
|
||||
// 如果想要中文版 element-ui,按如下方式声明
|
||||
Vue.use(ElementUI, { size: 'medium' });
|
||||
Vue.use(ElementUI, { size: 'medium' })
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
|
|
@ -97,7 +97,17 @@ export const asyncRoutes = [
|
|||
name: 'Dict',
|
||||
component: () => import('@/views/system/dict'),
|
||||
meta: { title: '数据字典', icon: 'example', perms: ['dict_manage'] }
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'external-link',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: process.env.VUE_APP_BASE_API + '/docs/',
|
||||
meta: { title: '接口文档', icon: 'link', perms: ['docs'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -41,7 +41,6 @@ const actions = {
|
|||
commit('SET_TOKEN', data.access)
|
||||
setToken(data.access)
|
||||
resolve()
|
||||
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
|
@ -64,7 +63,7 @@ const actions = {
|
|||
if (!perms || perms.length <= 0) {
|
||||
reject('没有任何权限!')
|
||||
}
|
||||
|
||||
|
||||
commit('SET_PERMS', perms)
|
||||
commit('SET_NAME', name)
|
||||
commit('SET_AVATAR', avatar)
|
||||
|
|
|
@ -22,4 +22,4 @@ export function removeToken() {
|
|||
// method: 'post',
|
||||
// data
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
|
|
@ -244,7 +244,7 @@ export function getTime(type) {
|
|||
export function debounce(func, wait, immediate) {
|
||||
let timeout, args, context, timestamp, result
|
||||
|
||||
const later = function () {
|
||||
const later = function() {
|
||||
// 据上一次触发时间间隔
|
||||
const last = +new Date() - timestamp
|
||||
|
||||
|
@ -261,7 +261,7 @@ export function debounce(func, wait, immediate) {
|
|||
}
|
||||
}
|
||||
|
||||
return function (...args) {
|
||||
return function(...args) {
|
||||
context = this
|
||||
timestamp = +new Date()
|
||||
const callNow = immediate && !timeout
|
||||
|
@ -346,37 +346,36 @@ export function removeClass(ele, cls) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
export function genTree(data) {
|
||||
let result = []
|
||||
const result = []
|
||||
if (!Array.isArray(data)) {
|
||||
return result
|
||||
}
|
||||
data.forEach(item => {
|
||||
delete item.children;
|
||||
});
|
||||
let map = {};
|
||||
delete item.children
|
||||
})
|
||||
const map = {}
|
||||
data.forEach(item => {
|
||||
item.label = item.name
|
||||
item.value = item.id
|
||||
map[item.id] = item;
|
||||
});
|
||||
map[item.id] = item
|
||||
})
|
||||
data.forEach(item => {
|
||||
let parent = map[item.pid];
|
||||
const parent = map[item.pid]
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item);
|
||||
(parent.children || (parent.children = [])).push(item)
|
||||
} else {
|
||||
result.push(item);
|
||||
result.push(item)
|
||||
}
|
||||
});
|
||||
return result;
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
const arrChange = arr => arr.map(item => {
|
||||
const res = {};
|
||||
for (let key in item) {
|
||||
let _key = key === 'name' ? 'label' : key;
|
||||
res[_key] = Array.isArray(item[key]) ? arrChange(item[key]) : item[key];
|
||||
const res = {}
|
||||
for (const key in item) {
|
||||
const _key = key === 'name' ? 'label' : key
|
||||
res[_key] = Array.isArray(item[key]) ? arrChange(item[key]) : item[key]
|
||||
}
|
||||
return res
|
||||
});
|
||||
})
|
||||
|
|
|
@ -9,7 +9,7 @@ export default function checkPermission(value) {
|
|||
if (value && value instanceof Array && value.length > 0) {
|
||||
const perms = store.getters && store.getters.perms
|
||||
const permissionperms = value
|
||||
if(perms.includes('admin')){
|
||||
if (perms.includes('admin')) {
|
||||
return true
|
||||
} // 如果是超管,都可以操作
|
||||
const hasPermission = perms.some(perm => {
|
||||
|
|
|
@ -78,8 +78,8 @@ export default {
|
|||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', message: "请输入账户" }],
|
||||
password: [{ required: true, trigger: 'blur', validator: validatePassword, message: "请输入密码" }]
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入账户' }],
|
||||
password: [{ required: true, trigger: 'blur', validator: validatePassword, message: '请输入密码' }]
|
||||
},
|
||||
loading: false,
|
||||
passwordType: 'password',
|
||||
|
|
|
@ -8,20 +8,20 @@
|
|||
class="filter-item"
|
||||
@keyup.native="handleFilter"
|
||||
/>
|
||||
<el-button type="primary" @click="handleAdd" icon="el-icon-plus">新增</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.filter(data => !search || data.name.toLowerCase().includes(search.toLowerCase()))"
|
||||
style="width: 100%;margin-top:10px;"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
v-loading="listLoading"
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table-column type="index" width="50"></el-table-column>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="岗位名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
@ -35,28 +35,28 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleEdit(scope)"
|
||||
icon="el-icon-edit"
|
||||
:disabled="!checkPermission(['position_update'])"
|
||||
></el-button>
|
||||
@click="handleEdit(scope)"
|
||||
/>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleDelete(scope)"
|
||||
icon="el-icon-delete"
|
||||
:disabled="!checkPermission(['position_delete'])"
|
||||
></el-button>
|
||||
@click="handleDelete(scope)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" :title="dialogType==='edit'?'编辑岗位':'新增岗位'">
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="position"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
ref="Form"
|
||||
>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="position.name" placeholder="名称" />
|
||||
|
@ -76,125 +76,125 @@ import {
|
|||
createPosition,
|
||||
deletePosition,
|
||||
updatePosition
|
||||
} from "@/api/position";
|
||||
import { genTree, deepClone } from "@/utils";
|
||||
import checkPermission from "@/utils/permission";
|
||||
} from '@/api/position'
|
||||
import { genTree, deepClone } from '@/utils'
|
||||
import checkPermission from '@/utils/permission'
|
||||
|
||||
const defaultM = {
|
||||
id: "",
|
||||
name: ""
|
||||
};
|
||||
id: '',
|
||||
name: ''
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
position: {
|
||||
id: "",
|
||||
name: ""
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
search: "",
|
||||
search: '',
|
||||
tableData: [],
|
||||
positionList: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
dialogType: 'new',
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入名称", trigger: "blur" }]
|
||||
name: [{ required: true, message: '请输入名称', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
this.listLoading = true
|
||||
getPositionAll().then(response => {
|
||||
this.positionList = response.data;
|
||||
this.tableData = response.data;
|
||||
this.listLoading = false;
|
||||
});
|
||||
this.positionList = response.data
|
||||
this.tableData = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
resetFilter() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
handleFilter() {
|
||||
const newData = this.positionList.filter(
|
||||
data =>
|
||||
!this.search ||
|
||||
data.name.toLowerCase().includes(this.search.toLowerCase())
|
||||
);
|
||||
this.tableData = genTree(newData);
|
||||
)
|
||||
this.tableData = genTree(newData)
|
||||
},
|
||||
handleAdd() {
|
||||
this.position = Object.assign({}, defaultM);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.position = Object.assign({}, defaultM)
|
||||
this.dialogType = 'new'
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
this.$refs['Form'].clearValidate()
|
||||
})
|
||||
},
|
||||
handleEdit(scope) {
|
||||
this.position = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
this.dialogVisible = true;
|
||||
this.position = Object.assign({}, scope.row) // copy obj
|
||||
this.dialogType = 'edit'
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
this.$refs['Form'].clearValidate()
|
||||
})
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error"
|
||||
this.$confirm('确认删除?', '警告', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'error'
|
||||
})
|
||||
.then(async () => {
|
||||
await deletePosition(scope.row.id);
|
||||
this.getList();
|
||||
.then(async() => {
|
||||
await deletePosition(scope.row.id)
|
||||
this.getList()
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "成功删除!"
|
||||
});
|
||||
type: 'success',
|
||||
message: '成功删除!'
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
console.error(err)
|
||||
})
|
||||
},
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate(valid => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
const isEdit = this.dialogType === 'edit'
|
||||
if (isEdit) {
|
||||
updatePosition(this.position.id, this.position).then(() => {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.getList()
|
||||
this.dialogVisible = false
|
||||
this.$notify({
|
||||
title: "成功",
|
||||
message: "编辑成功",
|
||||
type: "success",
|
||||
title: '成功',
|
||||
message: '编辑成功',
|
||||
type: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
} else {
|
||||
createPosition(this.position).then(res => {
|
||||
// this.position = res.data
|
||||
// this.tableData.unshift(this.position)
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.getList()
|
||||
this.dialogVisible = false
|
||||
this.$notify({
|
||||
title: "成功",
|
||||
message: "新增成功",
|
||||
type: "success",
|
||||
title: '成功',
|
||||
message: '新增成功',
|
||||
type: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
|
||||
<el-col :md="6">
|
||||
<el-input v-model="filterOrgText" placeholder="输入部门名进行过滤" />
|
||||
|
||||
<el-tree
|
||||
|
@ -227,7 +228,7 @@ export default {
|
|||
},
|
||||
myHeaders: { Authorization: "JWT " + getToken() },
|
||||
uploadUrl: uploadUrl(),
|
||||
userList: {'count':0},
|
||||
userList: {count:0},
|
||||
roles: [],
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"root": {
|
||||
"data": {
|
||||
"id": "c2r5hcwbvx40",
|
||||
"created": 1589530347633,
|
||||
"text": "认证类型"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"data": {
|
||||
"id": "c2r5hwut7340",
|
||||
"created": 1589530391077,
|
||||
"text": "CCC认证-中国强制性产品认证 "
|
||||
},
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "c2r5i3fhveg0",
|
||||
"created": 1589530405389,
|
||||
"text": "QMS认证-质量管理体系认证"
|
||||
},
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "c2r5iakzoqo0",
|
||||
"created": 1589530420958,
|
||||
"text": "EMS认证-环境管理体系认证"
|
||||
},
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "c2r5iii881c0",
|
||||
"created": 1589530438206,
|
||||
"text": "OHSMS认证-职业健康安全管理体系认证"
|
||||
},
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"template": "right",
|
||||
"theme": "fresh-blue",
|
||||
"version": "1.4.43"
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,248 @@
|
|||
<mxfile host="localhost" modified="2020-05-15T07:52:43.929Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.45.1 Chrome/78.0.3904.130 Electron/7.2.4 Safari/537.36" etag="SfNDyPFMewbP2SEPlODN" version="13.0.9">
|
||||
<diagram id="jxZWj97Vr7J1Z2vTljvs" name="Page-1">
|
||||
<mxGraphModel dx="1018" dy="792" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=14;" parent="1" source="2" target="28" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="开始" style="ellipse;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="50" y="70" width="120" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=20;" parent="1" source="3" target="18" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="认证申请" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="370" y="80" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="65" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="18" target="3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="600" y="50"/>
|
||||
<mxPoint x="430" y="50"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="68" value="审核不过" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="65" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.3565" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="-46" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="74" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="18" target="23" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="18" value="认证受理" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="530" y="80" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="75" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="23" target="25" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="23" value="派差" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="530" y="170" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;" parent="1" source="25" target="36" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="76" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="25" target="23" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="450" y="290"/>
|
||||
<mxPoint x="450" y="200"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="77" value="退回" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" parent="76" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.5613" y="4" relative="1" as="geometry">
|
||||
<mxPoint x="-42" y="-54" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="25" value="审核组接收" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="530" y="260" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="69" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="28" target="3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="310" y="360" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="70" value="否" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="69" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4" y="2" relative="1" as="geometry">
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="87" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="28" target="23" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="250" y="30"/>
|
||||
<mxPoint x="680" y="30"/>
|
||||
<mxPoint x="680" y="200"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="88" value="是" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="87" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.5971" y="-3" relative="1" as="geometry">
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="28" value="是否监督" style="rhombus;whiteSpace=wrap;html=1;fontSize=14;" parent="1" vertex="1">
|
||||
<mxGeometry x="210" y="70" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="78" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="36" target="38" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="114" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=14;" parent="1" source="36" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="590" y="530" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="36" value="现场审核" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="530" y="370" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="52" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;" parent="1" source="38" target="50" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="430" y="550"/>
|
||||
<mxPoint x="430" y="550"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="54" value="无" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="52" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.2" y="-2" relative="1" as="geometry">
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="79" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="38" target="41" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="335" y="450" as="sourcePoint"/>
|
||||
<mxPoint x="210" y="580" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="84" value="有" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="79" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.7355" y="-4" relative="1" as="geometry">
|
||||
<mxPoint x="-42" y="4" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="是否检测" style="rhombus;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="390" y="360" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="86" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="41" target="42" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="41" value="组长安排样品检测" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="190" y="370" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="89" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="42" target="49" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="42" value="ctc下达检测任务到实验室" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="190" y="470" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="90" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" parent="1" source="49" target="50" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="49" value="实验室出具检测报告" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="190" y="570" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="92" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;" parent="1" source="50" target="56" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="50" value="档案整理" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="370" y="570" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="119" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=14;" parent="1" source="56" target="116" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="127" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontSize=14;exitX=1.006;exitY=0.411;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="56" target="50" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="510" y="695"/>
|
||||
<mxPoint x="510" y="600"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="128" value="退回" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="127" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.2393" relative="1" as="geometry">
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="56" value="评定" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="370" y="670" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="105" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="60" target="106" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="300" y="910" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="107" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="60" target="108" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="580" y="910" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="109" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;" parent="1" source="60" target="104" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="60" value="出证" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="370" y="880" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="61" value="结束" style="ellipse;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="370" y="1060" width="120" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="110" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.95;entryY=1.05;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=16;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="104" target="60" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="530" y="1010"/>
|
||||
<mxPoint x="530" y="960"/>
|
||||
<mxPoint x="484" y="960"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="112" value="否" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="110" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.8671" y="-2" relative="1" as="geometry">
|
||||
<mxPoint x="18.33" y="-2" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="113" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=14;" parent="1" source="104" target="61" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="104" value="核实到款" style="rhombus;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="390" y="960" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="106" value="机构上报" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="190" y="880" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="108" value="劳务核算" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="530" y="880" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="115" value="审核员上报" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;" parent="1" vertex="1">
|
||||
<mxGeometry x="530" y="470" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="122" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontSize=14;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="116" target="60" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="650" y="830" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="123" value="通过" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="122" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.7" relative="1" as="geometry">
|
||||
<mxPoint y="8.17" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="124" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="116" target="56" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="510" y="800"/>
|
||||
<mxPoint x="510" y="700"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="125" value="退回" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" parent="124" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.5" y="25" relative="1" as="geometry">
|
||||
<mxPoint x="28" y="-25" as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="116" value="领导审批" style="rhombus;whiteSpace=wrap;html=1;fontSize=14;" parent="1" vertex="1">
|
||||
<mxGeometry x="390" y="760" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
|
@ -0,0 +1,18 @@
|
|||
# 从仓库拉取 带有 python 3.7 的 Linux 环境
|
||||
FROM python:3.6.8
|
||||
|
||||
# 设置 python 环境变量
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
|
||||
# 创建 code 文件夹并将其设置为工作目录
|
||||
RUN mkdir /cnas_server
|
||||
WORKDIR /cnas_server
|
||||
# 更新 pip
|
||||
RUN pip install pip -U -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# 将 requirements.txt 复制到容器的 code 目录
|
||||
ADD requirements.txt /cnas_server/
|
||||
# 安装库
|
||||
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# 将当前目录复制到容器的 code 目录
|
||||
ADD . /cnas_server/
|
|
@ -0,0 +1,10 @@
|
|||
version: "3"
|
||||
services:
|
||||
app:
|
||||
restart: always
|
||||
build: . # '点'代表当前目录
|
||||
command: "python3 manage.py runserver 0.0.0.0:8000"
|
||||
volumes:
|
||||
- .:/cnas_server
|
||||
ports:
|
||||
- "8000:8000"
|
|
@ -45,9 +45,11 @@
|
|||
|
||||
2.Model,Serializer,权限映射, 字段名一律小写, 单词之间用下划线连接
|
||||
|
||||
3.ViewSet和View必须写注释,可用'''注释
|
||||
3.模块、类和函数请使用docstring格式注释
|
||||
|
||||
4.业务模块全部放于apps文件夹下
|
||||
|
||||
5.遵循restful设计
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue