异常记录可指定提交人

This commit is contained in:
caoqianming 2021-05-15 20:46:51 +08:00
parent cd19746949
commit cca66d26c3
3 changed files with 19 additions and 5 deletions

View File

@ -22,7 +22,8 @@
<script type="text/javascript" src="/static/safesite/mystatic/layer/layer.js"></script> <script type="text/javascript" src="/static/safesite/mystatic/layer/layer.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/datagrid-export.js"></script> <script type="text/javascript" src="/static/safesite/mystatic/js/datagrid-export.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery-qrcode-0.17.0.min.js"></script> <script type="text/javascript" src="/static/safesite/mystatic/js/jquery-qrcode-0.17.0.min.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/ckeditor.js"></script> <!-- <script type="text/javascript" src="/static/safesite/mystatic/js/ckeditor.js"></script> -->
<!-- <script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script> -->
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script> <script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.form.min.js"></script> <script type="text/javascript" src="/static/safesite/mystatic/js/jquery.form.min.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.cookie.js"></script> <script type="text/javascript" src="/static/safesite/mystatic/js/jquery.cookie.js"></script>

View File

@ -39,11 +39,16 @@
<ol id="fileol"></ol> <ol id="fileol"></ol>
</div> </div>
<div style="margin-top:10px;margin-bottom:5px"> <div style="margin-top:10px;margin-bottom:5px">
<textarea id="ckeditor" ></textarea> <textarea id="ckeditor" style="height: 600;"></textarea>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<style>
.ck-editor__editable { min-height: 600px; }
</style>
<script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script>
<!-- <script type="text/javascript" src="/static/safesite/mystatic/js/ckeditor.js"></script> -->
<script> <script>
$('#isgg').switchbutton({ $('#isgg').switchbutton({
checked: true, checked: true,
@ -58,7 +63,12 @@
} }
} }
}) })
CKEDITOR.replace( 'ckeditor',{'height':600}); // CKEDITOR.replace( 'ckeditor',{'height':600});
var editor = ClassicEditor
.create( document.querySelector( '#ckeditor' ) )
.catch( error => {
console.error( error );
} );
function tzsubmitForm() { function tzsubmitForm() {
var tzfile = new Array(); var tzfile = new Array();
$(".filea").each(function () { $(".filea").each(function () {
@ -71,7 +81,7 @@
ffqd.push($(this).val()); ffqd.push($(this).val());
}); });
tzdata['ffqd']=ffqd tzdata['ffqd']=ffqd
tzdata['content']=CKEDITOR.instances.ckeditor.getData(); tzdata['content']= editor.getData();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: 'api/notice?a=add', url: 'api/notice?a=add',

View File

@ -7209,7 +7209,10 @@ def apiinspectitem(req):
if 'state' in i: if 'state' in i:
obj.state = i['state'] obj.state = i['state']
if i['state'] == '异常待处理': if i['state'] == '异常待处理':
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart) if 'todouser' in data and data['todouser']:
obj.todouser = User.objects.get(userid=data['todouser'])
else:
obj.todouser = getpgr2(userid, User.objects.get(userid=userid).ubelongpart)
obj.checkitem = EquipmentCheckItem.objects.get(pk=i['id']) obj.checkitem = EquipmentCheckItem.objects.get(pk=i['id'])
obj.inspect = Inspect.objects.get(pk=data['inspect']) obj.inspect = Inspect.objects.get(pk=data['inspect'])
if 'desc' in i: if 'desc' in i: