liucheng.js 23.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
$(function () {
    var chart = new Highcharts.Chart({
        credits: {
            enabled: false
        },
        chart: {
            renderTo: 'innerchart',
            events: {
                load: function () {
                    
                    // Draw the flow chart
                    var ren = this.renderer,
                        colors = Highcharts.getOptions().colors,
                        topArrow = ['M', 0, 50, 'L', 0, 0, 'L', -3, 3, 'M', 0, 0, 'L', 3, 3],
                        bottomArrow = ['M', 0, 0, 'L', 0, 50, 'L', -3, 47, 'M', 0, 50, 'L', 3, 47],
                        rightArrow = ['M', 0, 0, 'L', 50, 0, 'L', 47, 3, 'M', 50, 0, 'L', 47, -3],
                        leftArrow = ['M', 50, 0, 'L', 0, 0, 'L', 3, 3, 'M', 0, 0, 'L', 3, -3];

                    // 开始, 委托
                    ren.label('委<br>托<br>单<br>位<br>、<br>被<br>抽<br>检<br>单<br>位', 5, 150)
                        .attr({
                            fill: colors[0],
                            stroke: 'white',
                            'stroke-width': 2,
                            padding: 5,
                            r: 5,
                            height: 200
                        })
                        .css({
                            color: 'white'
                        })
                        .add()
                        .shadow(true);
                    // 诉讼处理意见
                    ren.label('诉讼处理意见', 100, 150)
                        .attr({
                            r: 5,
                            width: 75,
                            fill: colors[3]
                        })
                        .css({
                            color: 'white'
                        })
                        .add();
                    // 提出诉讼
                    ren.label('提出诉讼', 100, 220)
                        .attr({
                            r: 5,
                            width: 75,
                            fill: colors[5]
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add();
                    // 发送报告
                    ren.label('发送报告', 100, 280)
                        .attr({
                            r: 5,
                            width: 75,
                            fill: colors[6]
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add();
                    // 图纸
                    ren.label('图纸', 100, 340)
                        .attr({
                            r: 5,
                            width: 75,
                            fill: colors[7]
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add();
                     ren.label('综<br>合<br>部', 250, 150)
                        .attr({
                            fill: colors[8],
                            stroke: 'white',
                            'stroke-width': 2,
                            padding: 5,
                            r: 5,
                            height: 200
                        })
                        .css({
                            color: 'white'
                        })
                        .add()
                        .shadow(true);
                    ren.label('报告副本及<br>原记录归档', 230, 60)
                        .attr({
                            fill: colors[9],
                            stroke: 'white',
                            'stroke-width': 2,
                            padding: 5,
                            r: 5,
                            height: 30
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('归档', 340, 100)
                        .attr({
                            fill: colors[0],
                            stroke: 'white',
                            'stroke-width': 2,
                            padding: 5,
                            r: 5,
                            width: 50,
                            height: 30
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('受理投诉', 340, 150)
                        .attr({
                            fill: colors[1],
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('质量负责人', 440, 150)
                        .attr({
                            fill: colors[2],
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('调查原因', 540, 150)
                        .attr({
                            fill: colors[3],
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('反馈意见', 640, 150)
                        .attr({
                            fill: colors[4],
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('编写报告', 340, 200)
                        .attr({
                            fill: colors[5],
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('技术负责人审批', 440, 200)
                        .attr({
                            fill: colors[6],
                            r: 5
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);                    
                    ren.label('合同审批', 340, 250)
                        .attr({
                            fill: colors[7],
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('下<br>达<br>任<br>务<br>单', 445, 240)
                        .attr({
                            fill: colors[4],
                            r: 5,
                            height: 90
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('检<br>测<br>部', 505, 240)
                        .attr({
                            fill: colors[5],
                            r: 5,
                            height: 90
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('现<br>场<br>检<br>测', 565, 240)
                        .attr({
                            fill: colors[6],
                            r: 5,
                            height: 90
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('填<br>写<br>原<br>始<br>记<br>录', 625, 240)
                        .attr({
                            fill: colors[7],
                            r: 5,
                            height: 90
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('部<br>内<br>审<br>核', 685, 240)
                        .attr({
                            fill: colors[8],
                            r: 5,
                            height: 90
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('提<br>交<br>检<br>测<br>结<br>果', 745, 240)
                        .attr({
                            fill: colors[9],
                            r: 5,
                            height: 90
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('记录', 340, 360)
                        .attr({
                            fill: colors[0],
                            stroke: 'white',
                            'stroke-width': 2,
                            padding: 5,
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);
                    ren.label('修改', 480, 360)
                        .attr({
                            fill: colors[1],
                            stroke: 'white',
                            'stroke-width': 2,
                            padding: 5,
                            r: 5,
                            width: 60
                        })
                        .css({
                            color: 'white',
                            textAlign: 'center'
                        })
                        .add()
                        .shadow(true);

                    
                    
                    // 画线
                    ren.path(leftArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[0]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(40, 160)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[1]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(40, 230)
                        .add();
                    ren.path(leftArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[2]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(40, 290)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[3]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(40, 350)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[4]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(190, 160)
                        .add();
                    ren.path(leftArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[5]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(190, 230)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[6]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(190, 290)
                        .add();
                    ren.path(leftArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[7]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(190, 350)
                        .add();
                    ren.path(['M', 0, 40, 'L', 0, 0, 'L', -3, 3, 'M', 0, 0, 'L', 3, 3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[8]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(255, 105)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[9]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(280, 160)
                        .add();
                    ren.path(['M', 150, 145, 'L', 150, 125, 'C', 150, 115, 150, 115, 160, 115, 'L', 335, 115, 'L', 332, 118, 'M', 335, 115, 'L', 332, 112])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[0]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .add();
                    ren.path(['M', 310, 70, 'L', 360, 70, 'C', 370, 70, 370, 80, 370, 80, 'L', 370, 95, 'L', 367, 92, 'M', 370, 95, 'L', 373, 92])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[1]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .add();
                    ren.path(['M', 260, 145, 'L', 260, 135, 'C', 260, 125, 260, 125, 270, 125, 'L', 335, 125, 'L', 332, 122, 'M', 335, 125, 'L', 332, 128])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[2]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .add();
                    ren.path(['M', 0, 0, 'L', 25, 0, 'L', 22, 3, 'M', 25, 0, 'L', 22, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[3]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(410, 160)
                        .add();
                    ren.path(['M', 0, 0, 'L', 25, 0, 'L', 22, 3, 'M', 25, 0, 'L', 22, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[4]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(510, 160)
                        .add();
                    ren.path(['M', 0, 0, 'L', 25, 0, 'L', 22, 3, 'M', 25, 0, 'L', 22, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[5]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(610, 160)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[6]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(280, 210)
                        .add();
                    ren.path(['M', 0, 0, 'L', 25, 0, 'L', 22, 3, 'M', 25, 0, 'L', 22, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[7]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(410, 210)
                        .add();
                    ren.path(rightArrow)
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[8]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(280, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 30, 0, 'L', 27, 3, 'M', 30, 0, 'L', 27, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[9]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(410, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 30, 0, 'L', 27, 3, 'M', 30, 0, 'L', 27, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[0]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(470, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 30, 0, 'L', 27, 3, 'M', 30, 0, 'L', 27, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[1]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(530, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 30, 0, 'L', 27, 3, 'M', 30, 0, 'L', 27, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[2]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(590, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 30, 0, 'L', 27, 3, 'M', 30, 0, 'L', 27, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[3]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(650, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 30, 0, 'L', 27, 3, 'M', 30, 0, 'L', 27, -3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[4]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(710, 260)
                        .add();
                    ren.path(['M', 0, 0, 'L', 0, 15, 'L', -3, 12, 'M', 0, 15, 'L', 3, 12])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[5]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(515, 340)
                        .add();
                    ren.path(['M', 0, 0, 'L', -50, 0, 'L', -47, -3, 'M', -50, 0, 'L', -47, 3])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[6]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(475, 372)
                        .add();
                    ren.path(['M', 0, 0, 'L', 0, 75, 'L', -3, 72, 'M', 0, 75, 'L', 3, 72])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[7]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .translate(370, 280)
                        .add();
                    ren.path(['M', 710, 160, 'L', 720, 160, 'C', 720, 160, 725, 160, 725, 165, 'L', 725, 170, 'C', 725, 175, 720, 175, 720, 175, 'L', 280, 175, 'L', 283, 178, 'M', 280, 175, 'L', 283, 172])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[8]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .add();
                    ren.path(['M', 535, 210, 'L', 550, 210, 'C', 550, 210, 555, 210, 555, 205, 'L', 555, 195, 'C', 555, 190, 550, 190, 550, 190, 'L', 280, 190, 'L', 283, 193, 'M', 280, 190, 'L', 283, 187])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[9]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .add();
                    ren.path(['M', 770, 280, 'L', 780, 280, 'L', 780, 230, 'L', 280, 230, 'L', 283, 233, 'M', 280, 230, 'L', 283, 227])
                        .attr({
                            'stroke-width': 0,
                            stroke: colors[0]
                        })
                        .animate({'stroke-width': 2}, 3000)
                        .add();
                    
                }
            }
        },
        title: {
            text: '诺正检验工作流程图'
        }
            
    });
});