pull文件
This commit is contained in:
parent
7f25654e58
commit
a5f282a9b5
|
@ -10,10 +10,7 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='companyinfo',
|
||||
name='liaison_fax',
|
||||
),
|
||||
|
||||
migrations.AddField(
|
||||
model_name='operproce',
|
||||
name='filepath',
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-08 12:11
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0298_auto_20191216_1700'),
|
||||
('safesite', '0304_trouble_submituser'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
]
|
|
@ -0,0 +1,106 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-08 14:01
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0305_merge_20200108_1211'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Checkproject',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('checktitle', models.CharField(max_length=1000)),
|
||||
('checkcontent', models.CharField(max_length=1000)),
|
||||
('requirements', models.CharField(max_length=500)),
|
||||
('createdate', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('deletemark', models.IntegerField(default=1)),
|
||||
('checkstate', models.IntegerField(default=1)),
|
||||
('createuser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.User')),
|
||||
('usecomp', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='checkcomp', to='safesite.Partment')),
|
||||
],
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='menu',
|
||||
options={'verbose_name': '菜单&按钮', 'verbose_name_plural': '菜单&按钮'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='deletemark',
|
||||
field=models.IntegerField(default=1, verbose_name='删除标记'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='detail',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='描述'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='icon',
|
||||
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='图标'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='menucode',
|
||||
field=models.CharField(blank=True, max_length=30, null=True, verbose_name='菜单标识'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='menuid',
|
||||
field=models.AutoField(primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='menuname',
|
||||
field=models.CharField(blank=True, max_length=30, null=True, verbose_name='名称'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='parentid',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='safesite.Menu', verbose_name='上级'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='sortnum',
|
||||
field=models.IntegerField(default=1, verbose_name='排序号'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='type',
|
||||
field=models.IntegerField(choices=[(1, '菜单'), (2, '按钮')], default=1, verbose_name='类型'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='menu',
|
||||
name='url',
|
||||
field=models.CharField(blank=True, max_length=30, null=True, verbose_name='操作地址'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Checktask',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('checktaskname', models.CharField(max_length=300)),
|
||||
('checktime', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('checkplace', models.CharField(max_length=200)),
|
||||
('checkquestion', models.CharField(max_length=200)),
|
||||
('zgtime', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('createdate', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('deletemark', models.IntegerField(default=1)),
|
||||
('taskstate', models.IntegerField(default=1)),
|
||||
('zgyq', models.CharField(max_length=200)),
|
||||
('zgjg', models.CharField(max_length=200)),
|
||||
('yanshou', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('checkname', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jiancha', to='safesite.User')),
|
||||
('checktype', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.Checkproject')),
|
||||
('createuser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chuangjian', to='safesite.User')),
|
||||
('usecomp', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='taskcomps', to='safesite.Partment')),
|
||||
('yanshouren', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='yanshouren', to='safesite.User')),
|
||||
('zguser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.User')),
|
||||
],
|
||||
),
|
||||
]
|
|
@ -0,0 +1,36 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-10 16:24
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0306_auto_20200108_1401'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Checktable',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('checktitle', models.CharField(max_length=1000)),
|
||||
('checkprjtype', models.CharField(max_length=1000)),
|
||||
('createdate', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('deletemark', models.IntegerField(default=1)),
|
||||
('createuser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.User')),
|
||||
('usecomp', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='checktabcomp', to='safesite.Partment')),
|
||||
],
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checkproject',
|
||||
name='checkstate',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='checktask',
|
||||
name='checktype',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.Checktable'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,31 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-13 11:50
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0307_auto_20200110_1624'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='checktable',
|
||||
name='checkprjtype',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='checktable',
|
||||
name='checkprjtype',
|
||||
field=models.ManyToManyField(to='safesite.Checkproject'),
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='checkname',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='checktask',
|
||||
name='checkname',
|
||||
field=models.ManyToManyField(related_name='jiancha', to='safesite.User'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-14 15:36
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0308_auto_20200113_1150'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='checktable',
|
||||
name='checkcontent',
|
||||
field=models.CharField(default=2, max_length=1000),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-14 17:31
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0309_checktable_checkcontent'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='checktask',
|
||||
name='zguser',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='safesite.User'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,82 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-15 11:01
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0310_auto_20200114_1731'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='checkquestion',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='createdate',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='createuser',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='deletemark',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='taskstate',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='usecomp',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='yanshou',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='yanshouren',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='zgjg',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='zgtime',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='zguser',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='checktask',
|
||||
name='zgyq',
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='checkjob',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('checkquestion', models.CharField(max_length=200)),
|
||||
('zgtime', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('createdate', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('deletemark', models.IntegerField(default=1)),
|
||||
('taskstate', models.IntegerField(default=1)),
|
||||
('zgyq', models.CharField(max_length=200)),
|
||||
('zgjg', models.CharField(max_length=200)),
|
||||
('yanshou', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('checktask', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='safesite.Checktask')),
|
||||
('createuser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chuangjian', to='safesite.User')),
|
||||
('usecomp', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='taskcomps', to='safesite.Partment')),
|
||||
('yanshouren', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='yanshouren', to='safesite.User')),
|
||||
('zguser', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='safesite.User')),
|
||||
],
|
||||
),
|
||||
]
|
|
@ -0,0 +1,36 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-15 11:12
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0311_auto_20200115_1101'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='checktask',
|
||||
name='createdate',
|
||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='checktask',
|
||||
name='createuser',
|
||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='chuangjians', to='safesite.User'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='checktask',
|
||||
name='deletemark',
|
||||
field=models.IntegerField(default=1),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='checktask',
|
||||
name='usecomp',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='taskscomp', to='safesite.Partment'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-15 14:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0312_auto_20200115_1112'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='checkjob',
|
||||
name='checkname',
|
||||
field=models.ManyToManyField(related_name='jianchas', to='safesite.User'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,39 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-15 14:14
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0313_checkjob_checkname'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='checkjob',
|
||||
name='checkquestion',
|
||||
field=models.CharField(max_length=200, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='checkjob',
|
||||
name='createuser',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chuangjian', to='safesite.User'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='checkjob',
|
||||
name='yanshouren',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='yanshouren', to='safesite.User'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='checkjob',
|
||||
name='zgjg',
|
||||
field=models.CharField(max_length=200, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='checkjob',
|
||||
name='zgyq',
|
||||
field=models.CharField(max_length=200, null=True),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,24 @@
|
|||
# Generated by Django 2.2.8 on 2020-01-15 14:21
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('safesite', '0314_auto_20200115_1414'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='checkjob',
|
||||
name='checkname',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='checkjob',
|
||||
name='checkname',
|
||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='jianchas', to='safesite.User'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -1169,3 +1169,52 @@ class ReaderOperproce(models.Model):
|
|||
num = models.CharField(max_length=50)
|
||||
readeruser = models.ForeignKey(User,on_delete=models.CASCADE)
|
||||
readertime = models.DateTimeField(default = timezone.now)
|
||||
#检查项目
|
||||
class Checkproject(models.Model):
|
||||
id =models.AutoField(primary_key=True)#主键
|
||||
checktitle=models.CharField(max_length=1000)#检查项目标题
|
||||
checkcontent=models.CharField(max_length=1000)#检查内容
|
||||
requirements=models.CharField(max_length=500)#检查要求
|
||||
createuser = models.ForeignKey(User,on_delete=models.CASCADE)#创建人
|
||||
createdate = models.DateTimeField(default = timezone.now)#创建时间
|
||||
usecomp = models.ForeignKey(Partment,related_name='checkcomp',on_delete=models.CASCADE,null=True,blank=True)#创建公司
|
||||
deletemark = models.IntegerField(default=1)#是否删除
|
||||
#检查表
|
||||
class Checktable(models.Model):
|
||||
id =models.AutoField(primary_key=True)#主键
|
||||
checktitle=models.CharField(max_length=1000)#检查表名
|
||||
checkprjtype=models.ManyToManyField(Checkproject)#检查项目多选
|
||||
checkcontent=models.CharField(max_length=1000)#检查内容
|
||||
createuser = models.ForeignKey(User,on_delete=models.CASCADE)#创建人
|
||||
createdate = models.DateTimeField(default = timezone.now)#创建时间
|
||||
usecomp = models.ForeignKey(Partment,related_name='checktabcomp',on_delete=models.CASCADE,null=True,blank=True)#创建公司
|
||||
deletemark = models.IntegerField(default=1)#是否删除
|
||||
|
||||
#检查任务
|
||||
class Checktask(models.Model):
|
||||
id=models.AutoField(primary_key=True)#主键
|
||||
checktaskname=models.CharField(max_length=300)#任务名
|
||||
checktype=models.ForeignKey(Checktable,on_delete=models.CASCADE)#关联检查表
|
||||
checkname=models.ManyToManyField(User,related_name='jiancha')#检查人员
|
||||
checktime= models.DateTimeField(default = timezone.now)#检查时间
|
||||
checkplace=models.CharField(max_length=200)#检查地点
|
||||
createuser = models.ForeignKey(User,related_name='chuangjians',on_delete=models.CASCADE)#创建人
|
||||
createdate = models.DateTimeField(default = timezone.now)#创建时间
|
||||
usecomp = models.ForeignKey(Partment,related_name='taskscomp',on_delete=models.CASCADE,null=True,blank=True)#创建公司
|
||||
deletemark = models.IntegerField(default=1)#是否删除
|
||||
class Checkjob(models.Model):
|
||||
id=models.AutoField(primary_key=True)#主键
|
||||
checktask=models.ForeignKey(Checktask,on_delete=models.CASCADE)#关联任务表
|
||||
checkname=models.ForeignKey(User,related_name='jianchas',on_delete=models.CASCADE)#检查人员
|
||||
checkquestion=models.CharField(max_length=200,null=True)#检查发现的问题
|
||||
zgtime=models.DateTimeField(default = timezone.now)#整改期限
|
||||
zguser=models.ForeignKey(User,on_delete=models.CASCADE,null=True,)#整改人
|
||||
createuser = models.ForeignKey(User,related_name='chuangjian',on_delete=models.CASCADE,null=True)#创建人
|
||||
createdate = models.DateTimeField(default = timezone.now)#创建时间
|
||||
usecomp = models.ForeignKey(Partment,related_name='taskcomps',on_delete=models.CASCADE,null=True,blank=True)#创建公司
|
||||
deletemark = models.IntegerField(default=1)#是否删除
|
||||
taskstate = models.IntegerField(default=1)#检查任务状态,1正在检查,2检查完毕
|
||||
zgyq=models.CharField(max_length=200,null=True)#整改要求
|
||||
zgjg=models.CharField(max_length=200,null=True)#整改结果
|
||||
yanshou=models.DateTimeField(default = timezone.now)#验收时间
|
||||
yanshouren=models.ForeignKey(User,related_name='yanshouren',on_delete=models.CASCADE,null=True)#验收人员
|
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,68 @@
|
|||
|
||||
<div id="taskbar" style="padding: 4px;">
|
||||
|
||||
<div >
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<a id="addtask" class="easyui-linkbutton" onclick="addcheckrw()" data-options="iconCls: 'fa-plus',plain:true">查看任务</a>
|
||||
<a id="delprg" class="easyui-linkbutton" onclick="deltask()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="jobtab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
})
|
||||
|
||||
$('#jobtab').datagrid({
|
||||
url: 'api/checkproject?a=listall4',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
fitColumns: true,
|
||||
method: 'get',
|
||||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
border: false,
|
||||
toolbar:'#taskbar',
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'checktask__checktaskname', title: '任务名称', width: 100 },
|
||||
{ field: 'checktask__checktype__checktitle', title: '检查表', width: 100 },
|
||||
{ field: 'checktask__checktime', title: '检查时间', width: 100 },
|
||||
{ field: 'createdate', title: '创建时间', width: 100 },
|
||||
{
|
||||
field: 'taskstate', title: '执行状态', width: 100, formatter: function (value, row, index) {
|
||||
if (value == 1) {
|
||||
return '正在检查';
|
||||
}
|
||||
else if (value == 2) {
|
||||
return '检查完毕'
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
//{ field: 'checkname__name', title: '检查人员', width: 100 },
|
||||
//{ field: 'zguser__name', title: '整改人', width: 100 },
|
||||
//{ field: 'zgtime', title: '整改时间', width: 100 },
|
||||
|
||||
|
||||
]]
|
||||
});
|
||||
function addcheckrw() {
|
||||
var row = $('#jobtab').datagrid('getSelected');
|
||||
if (row) {
|
||||
opendg('查看检查任务','html/addcheckjob/'+row.id.toString())
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请先选择一条数据!');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,129 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
|
||||
<a href="javascript:void(0)" iconCls="fa-check" class="easyui-linkbutton" onclick="wssubmitForm()" id="submitb">提交</a>
|
||||
<a href="javascript:void(0)" iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">取消</a>
|
||||
</div>
|
||||
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
||||
<form id="wsff" method="post" name="wsff" enctype="multipart/form-data">
|
||||
<table class="listTab">
|
||||
<tr>
|
||||
<td>任务名称:</td>
|
||||
<td>
|
||||
<input id="checktaskname" class="easyui-textbox" name="checktaskname" style="width:480px">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>检查时间:</td>
|
||||
<td>
|
||||
<input id="starttime" editable="false" name="starttime" class="easyui-datetimebox" style="width:480px"
|
||||
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>检查人:</td>
|
||||
<td>
|
||||
<input id="checktabtitle" class="easyui-textbox" name="checktabtitle" style="width:480px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>检查内容:</td>
|
||||
<td>
|
||||
<input id="checkcontent" class="easyui-textbox" name="checkcontent" style="width:480px;height:100px" data-options="multiline:true">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>检查发现的问题:</td>
|
||||
<td>
|
||||
<input id="checkquestion" class="easyui-textbox" name="checkquestion" style="width:480px;height:100px" data-options="multiline:true" required=true>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>整改时间:</td>
|
||||
<td>
|
||||
<input id="zgtime" editable="false" name="zgtime" class="easyui-datetimebox" style="width:480px"
|
||||
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" required=true />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>整改人:</td>
|
||||
<td>
|
||||
<input id="zguser" class="easyui-textbox" name="zguser" style="width:480px" required=true />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>整改要求:</td>
|
||||
<td>
|
||||
<input id="zgyq" class="easyui-textbox" name="zgyq" style="width:480px;height:60px" data-options="multiline:true" required=true>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>整改结果:</td>
|
||||
<td>
|
||||
<input id="zgjg" class="easyui-textbox" name="zgjg" style="width:480px;height:60px" data-options="multiline:true" required=true>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>检查状态:</td>
|
||||
<td>
|
||||
|
||||
<input type="radio" name="taskstate" value="1">正在检查</input>
|
||||
<input type="radio" name="taskstate" value="2" checked="true">检查完成</input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var jobid = {{ id }}
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
|
||||
$.get('api/checkproject?a=jobdetail&id=' + jobid, function (res) {
|
||||
var data = res.data
|
||||
console.log(data)
|
||||
$('#checktaskname').textbox('setValue', data.checktask__checktaskname)
|
||||
$('#checktabtitle').textbox('setValue', data.checkname__name)
|
||||
$('#starttime').datetimebox('setValue', data.checktask__checktime)
|
||||
$('#checkcontent').textbox('setValue', data.checktask__checktype__checkcontent)
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
function wssubmitForm() {
|
||||
|
||||
var wsdata = $('#wsff').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'api/checkproject?a=addchecklist',
|
||||
data: JSON.stringify(wsdata),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
var bo = $('#wsff').form('validate')
|
||||
if (bo == false) {
|
||||
return bo
|
||||
} else {
|
||||
$('#submitb').linkbutton('disable');
|
||||
}
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$('#tasktab').datagrid('reload');
|
||||
$("#dd").dialog("close");
|
||||
} else { $.messager.alert('提示', '失败!'); }
|
||||
$('#submitb').linkbutton('enable');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,49 @@
|
|||
|
||||
<div id="taskbar" style="padding: 4px;">
|
||||
|
||||
<div >
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<a id="addtask" class="easyui-linkbutton" onclick="addcheckrw()" data-options="iconCls: 'fa-plus',plain:true">发布任务</a>
|
||||
<a id="delprg" class="easyui-linkbutton" onclick="deltask()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="tasktab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
})
|
||||
|
||||
$('#tasktab').datagrid({
|
||||
url: 'api/checkproject?a=listall3',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
fitColumns: true,
|
||||
method: 'get',
|
||||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
border: false,
|
||||
toolbar:'#taskbar',
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'checktaskname', title: '任务名称', width: 100 },
|
||||
{ field: 'checktype__checktitle', title: '检查表', width: 100 },
|
||||
{ field: 'checktime', title: '检查时间', width: 300 },
|
||||
{ field: 'createuser__name', title: '创建人', width: 300 },
|
||||
{ field: 'createdate', title: '创建时间', width: 300 },
|
||||
|
||||
|
||||
|
||||
]]
|
||||
});
|
||||
function addcheckrw(){
|
||||
opendg('发布检查任务','html/addcheckrw')
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,84 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
|
||||
<a href="javascript:void(0)" iconCls="fa-check" class="easyui-linkbutton" onclick="wssubmitForm()" id="submitb">提交</a>
|
||||
<a href="javascript:void(0)" iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">取消</a>
|
||||
</div>
|
||||
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
||||
<form id="wsff" method="post" name="wsff" enctype="multipart/form-data">
|
||||
|
||||
<div style="margin-top:10px;margin-bottom:5px">
|
||||
<input id="checktaskname" class="easyui-textbox" name="checktaskname" style="width:480px;height:40px" data-options="label:'任务名称'"
|
||||
required=true />
|
||||
</div>
|
||||
<div style="margin-top:10px;margin-bottom:5px">
|
||||
<input class="easyui-textbox" id="participantname" style="width:480px;height:60px" editable="false"
|
||||
data-options="label:'检查人员',multiline:true,prompt:'请选择'" required=true>
|
||||
<input type="hidden" id="participant" name="participant" />
|
||||
<a id="chooserys" class='easyui-linkbutton' onclick="choseusers()" style="width:auto">选择</a>
|
||||
</div>
|
||||
<div style="margin-top:10px;margin-bottom:5px">
|
||||
<input id="starttime" editable="false" name="starttime" class="easyui-datetimebox" style="width:480px;height:40px"
|
||||
data-options="label:'检查时间',currentText:'今天',closeText:'关闭',showSeconds:false" required=true />
|
||||
</div>
|
||||
<div style="margin-bottom:5px">
|
||||
<input id="checktabtitle" class="easyui-textbox" name="checktabtitle" style="width:480px;height:40px" data-options="label:'检查项目'" required=true />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#checktabtitle").combobox({
|
||||
url: 'api/checkproject?a=checktablist',
|
||||
valueField: 'value',
|
||||
textField: 'text',
|
||||
panelHeight:'auto',
|
||||
editable: false,
|
||||
});
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
function aaa(x) {
|
||||
if (x == "participant") {
|
||||
$('#participant').attr('value', top.$('#in').val());
|
||||
$('#participantname').textbox('setValue', top.$('#in').attr('show'));
|
||||
$('#participantnum').textbox('setValue', top.$('#in').attr('total'));
|
||||
}
|
||||
}
|
||||
|
||||
function wssubmitForm() {
|
||||
|
||||
var wsdata = $('#wsff').serializeJSON();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'api/checkproject?a=addchecklist',
|
||||
data: JSON.stringify(wsdata),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
var bo = $('#wsff').form('validate')
|
||||
if (bo == false) {
|
||||
return bo
|
||||
} else {
|
||||
$('#submitb').linkbutton('disable');
|
||||
}
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$('#tasktab').datagrid('reload');
|
||||
$("#dd").dialog("close");
|
||||
} else { $.messager.alert('提示', '失败!'); }
|
||||
$('#submitb').linkbutton('enable');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
<div id="prjbar" style="padding: 4px;">
|
||||
|
||||
<div >
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<a id="addprj" class="easyui-linkbutton" onclick="addprj()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
|
||||
<a id="delprg" class="easyui-linkbutton" onclick="delprj()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
<a id="updprj" class="easyui-linkbutton" onclick="updprj()" data-options="iconCls: 'fa-trash',plain:true">修改</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="prjtab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<script>
|
||||
$(function () {
|
||||
var option = $('#main').attr('value')
|
||||
$('#prjtab').datagrid({ url: 'api/checkproject', queryParams: { a: option } });
|
||||
})
|
||||
|
||||
$('#prjtab').datagrid({
|
||||
url: '',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
fitColumns: true,
|
||||
method: 'get',
|
||||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
border: false,
|
||||
toolbar:'#prjbar',
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'checktitle', title: '检查项', width: 100 },
|
||||
{ field: 'checkcontent', title: '检查内容', width: 300 },
|
||||
{ field: 'requirements', title: '检查要求', width: 300 },
|
||||
{ field: 'createdate', title: '创建时间', width: 100 },
|
||||
{ field: 'createuser__name', title: '创建人', width: 100 },
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
});
|
||||
function addprj(){
|
||||
opendg('新增检查项目','html/addcheckproject/'+0)
|
||||
}
|
||||
function updprj() {
|
||||
var row = $('#prjtab').datagrid('getSelected');
|
||||
if (row) {
|
||||
opendg('编辑检查项目','html/addcheckproject/'+row.id.toString())
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请先选择一条数据!');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function delprj() {
|
||||
var row = $('#prjtab').datagrid('getSelected');
|
||||
//alert(row.id);
|
||||
if (row) {
|
||||
$.messager.confirm('提示', '确定删除吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'api/checkproject?a=del',
|
||||
data: { 'id': row.id },
|
||||
datatype: "json",
|
||||
beforeSend: function () { },
|
||||
success: function (data) {
|
||||
//alert(1);
|
||||
if (data.code == 1) {
|
||||
$("#prjtab").datagrid('reload');
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '你无权删除该条信息!');
|
||||
}
|
||||
},
|
||||
complete: function (XMLHttpRequest, textStatus) {
|
||||
},
|
||||
error: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示', '请选择一行数据!');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
|
@ -0,0 +1,73 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
|
||||
<a href="javascript:void(0)" iconCls="fa-check" class="easyui-linkbutton" onclick="wssubmitForm()" id="submitb">提交</a>
|
||||
<a href="javascript:void(0)" iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">取消</a>
|
||||
</div>
|
||||
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
||||
<form id="wsff" method="post" name="wsff" enctype="multipart/form-data">
|
||||
|
||||
|
||||
|
||||
<div style="margin-top:10px;margin-bottom:5px">
|
||||
<input id="checktitle" class="easyui-textbox" name="checktitle" style="width:480px;height:40px" data-options="label:'项目名称'"
|
||||
required=true/>
|
||||
</div>
|
||||
|
||||
<div id="checks" style="margin-bottom:5px">
|
||||
<input id="checkcontent" class="easyui-textbox" name="checkcontent" style="width:480px;height:100px" data-options="label:'检查内容',multiline:true" required=true />
|
||||
|
||||
<input id="requirements" class="easyui-textbox" name="requirements" style="width:480px;height:100px" data-options="label:'检查要求',multiline:true" required=true />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var id = {{ id }}
|
||||
$(function () {
|
||||
|
||||
|
||||
$.get('api/checkproject?a=detail&id=' + id, function (res) {
|
||||
var data = res.data
|
||||
console.log(data)
|
||||
|
||||
$('#checktitle').textbox('setValue', data.checktitle)
|
||||
$('#checkcontent').textbox('setValue', data.checkcontent)
|
||||
$('#requirements').textbox('setValue', data.requirements)
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
function wssubmitForm() {
|
||||
|
||||
var wsdata = $('#wsff').serializeJSON();
|
||||
wsdata['id'] = id
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'api/checkproject?a=add',
|
||||
data: JSON.stringify(wsdata),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
var bo = $('#wsff').form('validate')
|
||||
if (bo == false) {
|
||||
return bo
|
||||
} else {
|
||||
$('#submitb').linkbutton('disable');
|
||||
}
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$('#prjtab').datagrid('reload');
|
||||
$("#dd").dialog("close");
|
||||
} else { $.messager.alert('提示', '失败!'); }
|
||||
$('#submitb').linkbutton('enable');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,74 @@
|
|||
<div class="easyui-layout" style="width:100%;height:100%;">
|
||||
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
|
||||
<a href="javascript:void(0)" iconCls="fa-check" class="easyui-linkbutton" onclick="wssubmitForm()" id="submitb">提交</a>
|
||||
<a href="javascript:void(0)" iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">取消</a>
|
||||
</div>
|
||||
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
||||
<form id="wsff" method="post" name="wsff" enctype="multipart/form-data">
|
||||
|
||||
<div style="margin-top:10px;margin-bottom:5px">
|
||||
<input id="checktaskname" class="easyui-textbox" name="checktaskname" style="width:480px;height:40px" data-options="label:'任务名称'"
|
||||
required=true />
|
||||
</div>
|
||||
<!--<div style="margin-bottom:5px">
|
||||
<input id="checktype" class="easyui-textbox" name="checktype" style="width:480px;height:40px" data-options="label:'检查项目',multiline:true" required=true />
|
||||
</div>-->
|
||||
<div style="margin-bottom:5px">
|
||||
<input id="checkcontent" class="easyui-textbox" name="checkcontent" style="width:480px;height:500px" data-options="label:'检查内容',multiline:true" required=true />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
//$(function () {
|
||||
// $("#checktype").combobox({
|
||||
// url: 'api/checkproject?a=project',
|
||||
// valueField: 'value',
|
||||
// textField: 'text',
|
||||
// multiple:true,
|
||||
// panelHeight:'auto',
|
||||
// editable: false,
|
||||
// });
|
||||
|
||||
|
||||
|
||||
//})
|
||||
|
||||
|
||||
|
||||
|
||||
function wssubmitForm() {
|
||||
|
||||
var wsdata = $('#wsff').serializeJSON();
|
||||
//var checkvalue = $("#checktype").combobox('getValues');
|
||||
|
||||
//wsdata['checkprjtype'] =checkvalue;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'api/checkproject?a=addcheck',
|
||||
data: JSON.stringify(wsdata),
|
||||
datatype: "json",
|
||||
processData: false,
|
||||
contentType: "application/json;charset=utf-8",
|
||||
beforeSend: function () {
|
||||
var bo = $('#wsff').form('validate')
|
||||
if (bo == false) {
|
||||
return bo
|
||||
} else {
|
||||
$('#submitb').linkbutton('disable');
|
||||
}
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 1) {
|
||||
$('#tasktab').datagrid('reload');
|
||||
$("#dd").dialog("close");
|
||||
} else { $.messager.alert('提示', '失败!'); }
|
||||
$('#submitb').linkbutton('enable');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
<div id="taskbar" style="padding: 4px;">
|
||||
|
||||
<div >
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<a id="addtask" class="easyui-linkbutton" onclick="addtask()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
||||
<a id="delprg" class="easyui-linkbutton" onclick="deltask()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<table id="tasktab" style="width:100%;height:100%;text-align: center;"></table>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
})
|
||||
|
||||
$('#tasktab').datagrid({
|
||||
url: 'api/checkproject?a=listall2',
|
||||
rownumbers: true,
|
||||
singleSelect: true,
|
||||
striped: true,
|
||||
fitColumns: true,
|
||||
method: 'get',
|
||||
pagination: 'true',
|
||||
pageSize: 20,
|
||||
border: false,
|
||||
toolbar:'#taskbar',
|
||||
columns: [[
|
||||
{ field: 'id', title: 'ID', hidden: true },
|
||||
{ field: 'checktitle', title: '检查名称', width: 100 },
|
||||
{ field: 'checkcontent', title: '检查内容', width: 100 },
|
||||
|
||||
{ field: 'createuser__name', title: '创建人', width: 300 },
|
||||
{ field: 'createdate', title: '创建时间', width: 300 },
|
||||
|
||||
|
||||
]]
|
||||
});
|
||||
function addtask(){
|
||||
opendg('新增检查任务','html/addchecktask?a=addcheck')
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery-qrcode-0.17.0.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/ckeditor/4.8.0/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script>
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?zfeatures=requestAnimationFrame,Element.prototype.classList,URL"></script>
|
||||
<style type="text/css">
|
||||
.easyui-linkbutton:hover
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
switch (value) {
|
||||
case 1: return 'color:white;background-color:green'; break;
|
||||
}}},
|
||||
{ field: 'user__userid', title: '执行状态', width: 80, formatter: function (value, row, index) {
|
||||
{ field: 'user__userid', title: '执行状态', width: 80, formatter: function (value, row, index) {
|
||||
if(value==null){
|
||||
return '未执行';
|
||||
}else{
|
||||
|
|
|
@ -100,6 +100,16 @@ urlpatterns = [
|
|||
path('html/addoperproce',views.addoperproce),
|
||||
path('html/operproce/detail/<int:id>/',views.operprocedetail),#责任制度观看详情
|
||||
path('html/datashow2/',views.datashow2),
|
||||
path('html/checkproject',views.checkproject),#检查项目
|
||||
path('html/addcheckproject/<int:id>/',views.addcheckproject),#检查项目
|
||||
path('html/checktask',views.checktask),#检查任务
|
||||
path('html/addchecktask',views.addchecktask),#检查任务
|
||||
|
||||
path('html/checklist',views.checklist),#检查任务
|
||||
path('html/addcheckrw',views.addcheckrw),#检查任务
|
||||
path('html/checkjob',views.checkjob),#检查任务
|
||||
path('html/addcheckjob/<int:id>/',views.addcheckjob),#检查任务
|
||||
|
||||
#html页面
|
||||
|
||||
|
||||
|
@ -177,7 +187,7 @@ urlpatterns = [
|
|||
path('unbindwechat', views.unbindwechat),
|
||||
path('unbindmp', views.unbindmp),
|
||||
path('mplogin',views.mplogin),
|
||||
|
||||
path('api/checkproject',views.checkprojects),#检查
|
||||
path('importusers',views.importusers),#其他
|
||||
path('test',views.test),
|
||||
path('.well-known/pki-validation/fileauth.txt',views.vewechat),#验证
|
||||
|
|
|
@ -3,7 +3,7 @@ from captcha.helpers import captcha_image_url
|
|||
from captcha.models import CaptchaStore
|
||||
from django.shortcuts import render, redirect, render_to_response
|
||||
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
|
||||
from .models import User, Trouble, Dickey, Partment, Dicclass, Train, Drill, TroubleAccess, Group, Yjyc, Trainuser, Drilluser, Yjsetup, Menu, Observe, Observeto, Unsafes, Miss, Socertificate, Userprofile, Suggest, Notice, Noticeto, Operation, Operzyry, Fxcs, Operationspjd, Operspxq, Question, ExamPaper, ExamTest, ExamPaperDetail, ExamTestDetail, Questioncat, Safecert, Map, Area, Missto, Suggestflow, Equipment, Inspect, Risk, RiskAct, Risktask, Riskcheck, Report, RiskActTask, Riskcheck2,Resbility,Operproce,Readerblility,ReaderOperproce
|
||||
from .models import User, Trouble, Dickey, Partment, Dicclass, Train, Drill,TroubleAccess, Group, Yjyc, Checktable,Trainuser, Drilluser, Yjsetup, Menu, Observe, Observeto, Unsafes, Miss, Socertificate, Userprofile, Suggest, Notice, Noticeto, Operation, Operzyry, Fxcs, Operationspjd, Operspxq, Question, ExamPaper, ExamTest, ExamPaperDetail, ExamTestDetail, Questioncat, Safecert, Map, Area, Missto, Suggestflow, Equipment, Inspect, Risk, RiskAct, Risktask, Riskcheck, Report, RiskActTask, Riskcheck2,Resbility,Operproce,Readerblility,ReaderOperproce,Checkproject,Checktask,Checkjob
|
||||
from django.template import RequestContext
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.core import serializers
|
||||
|
@ -492,9 +492,22 @@ def operprocedetail(req, id):
|
|||
|
||||
def datashow2(req):
|
||||
return render(req,'datashow2.html')
|
||||
|
||||
|
||||
|
||||
def checkproject(req):#检查项目
|
||||
return render(req, 'checkproject.html')
|
||||
def addcheckproject(req,id):#责任制
|
||||
return render(req,'checkprojectadd.html', {'id': id})
|
||||
def checktask(req):#检查项目
|
||||
return render(req, 'checktable.html')
|
||||
def addchecktask(req):#责任制
|
||||
return render(req,'checktabadd.html')
|
||||
def checkjob(req):
|
||||
return render(req,'checkjob.html')
|
||||
def addcheckjob(req,id):
|
||||
return render(req,'checkjobadd.html', {'id': id})
|
||||
def checklist(req):
|
||||
return render(req,'checklist.html')
|
||||
def addcheckrw(req):
|
||||
return render(req,'checklistadd.html')
|
||||
|
||||
def mainhtml(req):
|
||||
# 计算一些数据
|
||||
|
@ -7305,3 +7318,132 @@ def getprodata(req):
|
|||
a = ReaderOperproce.objects.filter(readid=id).values('id','readeruser__name','readertime')
|
||||
total = a.count()
|
||||
return HttpResponse(transjson(total,a),content_type="application/json")
|
||||
def checkprojects(req):
|
||||
a = req.GET.get('a')
|
||||
userid = req.session['userid']
|
||||
companyid = getcompany(userid)
|
||||
if a == 'add':
|
||||
data = json.loads(req.body.decode('utf-8'))
|
||||
if data['id']==0:
|
||||
|
||||
|
||||
obj = Checkproject()
|
||||
|
||||
obj.checktitle = data['checktitle']
|
||||
obj.checkcontent = data['checkcontent']
|
||||
obj.createuser = User.objects.get(userid=userid)
|
||||
obj.requirements = data['requirements']
|
||||
obj.usecomp=Partment.objects.get(partid=companyid)
|
||||
obj.save()
|
||||
else:
|
||||
obj = Checkproject.objects.get(id=data['id'])
|
||||
|
||||
obj.checktitle = data['checktitle']
|
||||
obj.checkcontent = data['checkcontent']
|
||||
obj.requirements = data['requirements']
|
||||
obj.save()
|
||||
|
||||
|
||||
return JsonResponse({"code": 1})
|
||||
elif a == 'detail':
|
||||
obj = Checkproject.objects.filter(id=req.GET.get('id'))
|
||||
obj = obj.values('checktitle', 'checkcontent', 'requirements')[0]
|
||||
|
||||
return JsonResponse({'code': 1, 'data': obj})
|
||||
|
||||
elif a == 'project':
|
||||
projectlist = Checkproject.objects.filter(usecomp__partid=companyid).values('id', 'checktitle', 'checkcontent')
|
||||
return HttpResponse(transstr(projectlist,'id','checktitle'),content_type="application/json")
|
||||
elif a == 'listall':
|
||||
startnum,endnum = fenye(req)
|
||||
a = Checkproject.objects.filter(usecomp=Partment.objects.get(partid=companyid), deletemark=1)
|
||||
|
||||
total = a.count()
|
||||
startnum, endnum = fenye(req)
|
||||
a = a[startnum:endnum].values('id','checktitle', 'checkcontent', 'requirements', 'createuser__name', 'createdate')
|
||||
|
||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||
#任务表保存
|
||||
elif a == 'addcheck':
|
||||
data = json.loads(req.body.decode('utf-8'))
|
||||
obj = Checktable()
|
||||
obj.checktitle = data['checktaskname']
|
||||
obj.checkcontent=data['checkcontent']
|
||||
obj.createuser = User.objects.get(userid=userid)
|
||||
obj.usecomp=Partment.objects.get(partid=companyid)
|
||||
obj.save()
|
||||
#list = data['checkprjtype']
|
||||
#for i in list:
|
||||
# x = Checkproject.objects.get(id=i)
|
||||
# obj.checkprjtype.add(x)
|
||||
return JsonResponse({"code": 1})
|
||||
#任务列表
|
||||
elif a == 'listall2':
|
||||
startnum,endnum = fenye(req)
|
||||
a = Checktable.objects.filter(usecomp=Partment.objects.get(partid=companyid), deletemark=1)
|
||||
total = a.count()
|
||||
startnum, endnum = fenye(req)
|
||||
|
||||
a = a[startnum:endnum].values('id','checktitle','checkcontent', 'createuser__name','createdate')
|
||||
|
||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||
elif a == 'listall3':
|
||||
startnum,endnum = fenye(req)
|
||||
a = Checktask.objects.filter(usecomp=Partment.objects.get(partid=companyid), deletemark=1)
|
||||
total = a.count()
|
||||
startnum, endnum = fenye(req)
|
||||
|
||||
a = a[startnum:endnum].values('id','checktaskname','checktype__checktitle', 'checktime','createuser__name','createdate')
|
||||
|
||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||
elif a == 'listall4':
|
||||
startnum,endnum = fenye(req)
|
||||
a = Checkjob.objects.filter(usecomp=Partment.objects.get(partid=companyid),checkname__userid=userid,deletemark=1)
|
||||
total = a.count()
|
||||
startnum, endnum = fenye(req)
|
||||
|
||||
a = a[startnum:endnum].values('id','checktask__checktaskname','zguser__name','zgtime','checktask__checktype__checktitle','checkname__name', 'taskstate','checktask__checktime','createuser__name','createdate')
|
||||
|
||||
return HttpResponse(transjson(total, a), content_type="application/json")
|
||||
elif a == 'jobdetail':
|
||||
obj = Checkjob.objects.filter(id=req.GET.get('id'))
|
||||
obj = obj.values('checktask__checktaskname','checktask__checktype__checkcontent','checkname__name','checktask__checktime')[0]
|
||||
|
||||
return JsonResponse({'code': 1, 'data': obj})
|
||||
elif a=='checktablist':
|
||||
projectlist = Checktable.objects.filter(usecomp__partid=companyid).values('id', 'checktitle')
|
||||
return HttpResponse(transstr(projectlist,'id','checktitle'),content_type="application/json")
|
||||
elif a=='addchecklist':
|
||||
data = json.loads(req.body.decode('utf-8'))
|
||||
obj = Checktask()
|
||||
obj.checktaskname = data['checktaskname']
|
||||
obj.checktime=data['starttime']
|
||||
obj.checktype =Checktable.objects.get(id=data['checktabtitle'])
|
||||
obj.createuser = User.objects.get(userid=userid)
|
||||
obj.usecomp=Partment.objects.get(partid=companyid)
|
||||
obj.yanshouren=User.objects.get(userid=userid)
|
||||
obj.save()
|
||||
|
||||
list = data['participant'].split(',')
|
||||
for i in list:
|
||||
x = User.objects.get(userid=i)
|
||||
obj.checkname.add(x)
|
||||
objs = Checkjob()
|
||||
objs.checktask=obj
|
||||
objs.checkname=x
|
||||
objs.usecomp=Partment.objects.get(partid=companyid)
|
||||
objs.save()
|
||||
|
||||
return JsonResponse({"code": 1})
|
||||
#删除
|
||||
elif a == 'del':
|
||||
id =req.GET.get('id')
|
||||
a = Checkproject.objects.get(id=id)
|
||||
if a.createuser==User.objects.get(userid=userid):
|
||||
a.deletemark=0
|
||||
a.save()
|
||||
return JsonResponse({"code":1})
|
||||
|
||||
else:
|
||||
|
||||
return JsonResponse({"code":0})
|
Loading…
Reference in New Issue